Version 22.47.1: Oct 15, 2022 Removed unused code.

This commit is contained in:
acanas 2022-10-15 10:58:23 +02:00
parent 5b4a928226
commit 3263490ff1
26 changed files with 50 additions and 152 deletions

View File

@ -1783,8 +1783,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
{
HTM_TD_Begin ("class=\"%s LT\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
}
@ -2993,8 +2992,7 @@ static void Att_WriteRowUsrSeveralAttEvents (const struct Att_Events *Events,
{
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
}
@ -3165,8 +3163,7 @@ static void Att_ListAttEventsForAStd (struct Att_Events *Events,
HTM_TD_Begin ("colspan=\"2\" class=\"RM %s\"",
The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());

View File

@ -3235,8 +3235,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct Usr_Data *UsrDat)
/***** Show user's photo *****/
HTM_TD_Begin ("class=\"OWNER_WORKS_PHOTO\"");
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** Begin form to send a message to this user *****/
@ -5473,8 +5472,7 @@ static void Brw_WriteFileOrFolderPublisher (unsigned Level,long UsrCod)
if (ShowUsr)
/***** Show photo *****/
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
else
Ico_PutIcon ("usr_bl.jpg",Ico_UNCHANGED,Txt_Unknown_or_without_photo,
ClassPhoto[Gbl.Prefs.PhotoShape]);
@ -8026,8 +8024,7 @@ void Brw_ShowFileMetadata (void)
{
/* Show photo */
Pho_ShowUsrPhotoIfAllowed (&PublisherUsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
/* Write name */
HTM_NBSP ();

View File

@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia.
*/
#define Log_PLATFORM_VERSION "SWAD 22.47 (2022-10-15)"
#define Log_PLATFORM_VERSION "SWAD 22.47.1 (2022-10-15)"
#define CSS_FILE "swad22.46.css"
#define JS_FILE "swad21.100.js"
/*
Version 22.47.1: Oct 15, 2022 Removed unused code. (333126 lines)
Version 22.47: Oct 15, 2022 Code optimization related to forms. (333227 lines)
Version 22.46.3: Oct 15, 2022 Code refactoring submiting forms. (333211 lines)
Version 22.46.2: Oct 14, 2022 Changes in anchors behavior in project listing. (333228 lines)

View File

@ -174,11 +174,6 @@ void Con_ShowGlobalConnectedUsrs (void)
/***** Number of sessions *****/
/* Link to view more details about connected users */
/*
Frm_BeginFormUnique (ActLstCon); // Must be unique because
// the list of connected users
// is dynamically updated via AJAX
*/
Frm_BeginForm (ActLstCon);
HTM_BUTTON_Submit_Begin (Txt_Connected_users,"class=\"BT_LINK\"");
@ -329,11 +324,6 @@ void Con_ShowConnectedUsrsBelongingToCurrentCrs (void)
/***** Number of connected users who belong to course *****/
/* Link to view more details about connected users */
/*
Frm_BeginFormUnique (ActLstCon); // Must be unique because
// the list of connected users
// is dynamically updated via AJAX
*/
Frm_BeginForm (ActLstCon);
HTM_BUTTON_Submit_Begin (Txt_Connected_users,"class=\"BT_LINK\"");
Str_Copy (CourseName,Gbl.Hierarchy.Crs.ShrtName,sizeof (CourseName) - 1);
@ -420,11 +410,6 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro
{
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"3\" class=\"CM\"");
/*
Frm_BeginFormUnique (ActLstCon); // Must be unique because
// the list of connected users
// is dynamically updated via AJAX
*/
Frm_BeginForm (ActLstCon);
Sco_PutParamScope ("ScopeCon",HieLvl_CRS);
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"ellipsis-h.svg",
@ -605,8 +590,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
/***** Show photo *****/
HTM_TD_Begin ("class=\"CON_PHOTO %s\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
true);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** Write full name and link *****/
@ -615,11 +599,6 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
HTM_TD_Begin ("class=\"%s %s\"",ClassTxt,The_GetColorRows ());
if (!NextAction[Role])
Err_WrongRoleExit ();
/*
Frm_BeginFormUnique (NextAction[Role]); // The form must be unique because
// the list of connected users
// is dynamically updated via AJAX
*/
Frm_BeginForm (NextAction[Role]);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
@ -715,8 +694,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
/***** Show photo *****/
HTM_TD_Begin ("class=\"CON_PHOTO %s\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** Write full name and link *****/

View File

@ -2245,8 +2245,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
HTM_TD_Begin ("class=\"CT DAT_%s\" style=\"width:22px;\"",
The_GetSuffix ());
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** User name *****/

View File

@ -1554,8 +1554,7 @@ void ExaRes_ShowExamResultUser (struct Usr_Data *UsrDat)
HTM_TxtF (", %s",UsrDat->FrstName);
HTM_BR ();
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** Row end *****/

View File

@ -610,8 +610,7 @@ static void Fol_ShowFollowedOrFollower (struct Usr_Data *UsrDat)
HTM_TD_Begin ("class=\"FOLLOW_PHOTO\"");
if (Visible)
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** Show user's name and icon to follow/unfollow *****/
@ -673,8 +672,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct Usr_Data *UsrDat)
HTM_TD_Begin ("class=\"CON_PHOTO %s\"",The_GetColorRows ());
if (Visible)
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** User's name *****/

View File

@ -80,28 +80,7 @@ void Frm_BeginFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,con
snprintf (Gbl.Form.Id,sizeof (Gbl.Form.Id),"form_%d",Gbl.Form.Num);
Frm_BeginFormInternal (NextAction,true,Gbl.Form.Id,Anchor,OnSubmit); // Do put now parameter location (if no open session)
}
/*
void Frm_BeginFormUnique (Act_Action_t NextAction)
{
Frm_BeginFormUniqueAnchor (NextAction,NULL);
}
void Frm_BeginFormUniqueAnchor (Act_Action_t NextAction,const char *Anchor)
{
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
snprintf (Gbl.Form.UniqueId,sizeof (Gbl.Form.UniqueId),"form_%s_%d",
Gbl.UniqueNameEncrypted,Gbl.Form.Num);
Frm_BeginFormInternal (NextAction,true,Gbl.Form.UniqueId,Anchor,NULL); // Do put now parameter location (if no open session)
}
void Frm_BeginFormUniqueAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit)
{
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
snprintf (Gbl.Form.UniqueId,sizeof (Gbl.Form.UniqueId),"form_%s_%d",
Gbl.UniqueNameEncrypted,Gbl.Form.Num);
Frm_BeginFormInternal (NextAction,true,Gbl.Form.UniqueId,Anchor,OnSubmit); // Do put now parameter location (if no open session)
}
*/
void Frm_BeginFormId (Act_Action_t NextAction,const char *Id)
{
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0

View File

@ -50,10 +50,7 @@ void Frm_BeginFormGoTo (Act_Action_t NextAction);
void Frm_BeginForm (Act_Action_t NextAction);
void Frm_BeginFormOnSubmit (Act_Action_t NextAction,const char *OnSubmit);
void Frm_BeginFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit);
// void Frm_BeginFormUnique (Act_Action_t NextAction);
void Frm_BeginFormAnchor (Act_Action_t NextAction,const char *Anchor);
// void Frm_BeginFormUniqueAnchor (Act_Action_t NextAction,const char *Anchor);
// void Frm_BeginFormUniqueAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit);
void Frm_BeginFormId (Act_Action_t NextAction,const char *Id);
void Frm_BeginFormNoAction (void);
void Frm_SetParamsForm (char ParamsStr[Frm_MAX_BYTES_PARAMS_STR],Act_Action_t NextAction,

View File

@ -79,7 +79,6 @@ struct Globals
{
int Num; // Number of form, used in form submit links
char Id[32]; // Identifier string used in forms
// char UniqueId[32 + Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 10 + 1]; // Unique identifier string used in forms
bool Inside; // Set to true inside a form to avoid nested forms
} Form;
struct

View File

@ -1155,8 +1155,7 @@ void MchRes_ShowOneMchResult (void)
HTM_TxtF (", %s",UsrDat->FrstName);
HTM_BR ();
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
HTM_TR_End ();

View File

@ -492,8 +492,7 @@ static void Msg_ShowOneUniqueRecipient (void)
/***** Show user's photo *****/
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
/****** Write user's IDs ******/
HTM_DIV_Begin ("class=\"MSG_TO_ONE_RCP %s_%s\"",
@ -2328,8 +2327,7 @@ void Msg_WriteMsgAuthor (struct Usr_Data *UsrDat,bool Enabled)
HTM_TD_Begin ("class=\"CT\" style=\"width:30px;\"");
if (WriteAuthor)
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
else
Ico_PutIcon ("usr_bl.jpg",Ico_UNCHANGED,Txt_Unknown_or_without_photo,
ClassPhoto[Gbl.Prefs.PhotoShape]);
@ -2470,8 +2468,7 @@ static void Msg_WriteMsgFrom (struct Msg_Messages *Messages,
/***** Put user's photo *****/
HTM_TD_Begin ("class=\"CM\" style=\"width:30px;\"");
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** Write user's name *****/
@ -2614,8 +2611,7 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
false);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/* Write user's name */
@ -2921,8 +2917,7 @@ void Msg_ListBannedUsrs (void)
/* Show photo */
HTM_TD_Begin ("class=\"LM\" style=\"width:30px;\"");
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/* Write user's full name */

View File

@ -416,8 +416,7 @@ void Pho_ReqRemoveMyPhoto (void)
/* Show current photo */
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
/* End alert */
Ale_ShowAlertAndButton2 (ActRemMyPho,NULL,NULL,
@ -505,8 +504,7 @@ void Pho_ReqRemoveUsrPhoto (void)
/* Show current photo */
Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
/* End alert */
Ale_ShowAlertAndButton2 (NextAction[Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs],NULL,NULL,
@ -942,15 +940,14 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
/*****************************************************************************/
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
const char *ClassPhoto,Pho_Zoom_t Zoom,
bool FormUnique)
const char *ClassPhoto,Pho_Zoom_t Zoom)
{
char PhotoURL[PATH_MAX + 1];
bool ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
ClassPhoto,Zoom,FormUnique);
ClassPhoto,Zoom);
}
/*****************************************************************************/
@ -1247,8 +1244,7 @@ void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
/*****************************************************************************/
void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
const char *ClassPhoto,Pho_Zoom_t Zoom,
bool FormUnique)
const char *ClassPhoto,Pho_Zoom_t Zoom)
{
Act_BrowserTab_t BrowserTab = Act_GetBrowserTab (Gbl.Action.Act);
bool BrowserTabIs1stTab = (BrowserTab == Act_BRW_1ST_TAB ||
@ -1262,12 +1258,8 @@ void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
/***** Begin form to go to public profile *****/
if (PutLinkToPublicProfile)
{
if (FormUnique)
// Frm_BeginFormUnique (ActSeeOthPubPrf);
Frm_BeginForm (ActSeeOthPubPrf);
else
Frm_BeginForm (ActSeeOthPubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
Frm_BeginForm (ActSeeOthPubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
HTM_BUTTON_Submit_Begin (NULL,"class=\"BT_LINK\"");
}

View File

@ -116,8 +116,7 @@ void Pho_UpdateUsrPhoto2 (void);
unsigned Pho_UpdateMyClicksWithoutPhoto (void);
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
const char *ClassPhoto,Pho_Zoom_t Zoom,
bool FormUnique);
const char *ClassPhoto,Pho_Zoom_t Zoom);
bool Pho_ShowingUsrPhotoIsAllowed (struct Usr_Data *UsrDat,
char PhotoURL[PATH_MAX + 1]);
bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[PATH_MAX + 1]);
@ -127,8 +126,7 @@ void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
char **ImgStr,
char **CaptionStr);
void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
const char *ClassPhoto,Pho_Zoom_t Zoom,
bool FormUnique);
const char *ClassPhoto,Pho_Zoom_t Zoom);
bool Pho_RemovePhoto (struct Usr_Data *UsrDat);
void Pho_UpdatePhotoName (struct Usr_Data *UsrDat);

View File

@ -1329,8 +1329,7 @@ static void Prf_ShowUsrInRanking (struct Usr_Data *UsrDat,unsigned Rank,bool Its
if (Visible)
/***** User's photo *****/
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** Put form to go to public profile *****/

View File

@ -2042,8 +2042,7 @@ static void Prj_ShowProjectMembersWithARole (struct Prj_Projects *Projects,
/* Put user's photo */
HTM_TD_Begin ("class=\"PRJ_MEMBER_PHO\"");
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/* Write user's name */

View File

@ -2585,8 +2585,7 @@ static void Rec_ShowPhoto (struct Usr_Data *UsrDat)
/***** User's photo *****/
HTM_TD_Begin ("rowspan=\"3\" class=\"REC_C3_TOP CT\"");
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
}

View File

@ -1375,8 +1375,7 @@ static void Sta_ShowNumHitsPerUsr (Sta_CountType_t CountType,
/* Show the photo */
HTM_TD_Begin ("class=\"CT %s\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/* Write the user's ID if user is a student in current course */

View File

@ -2275,8 +2275,7 @@ void TstPrn_ShowOnePrint (void)
HTM_TxtF (", %s",Gbl.Usrs.Other.UsrDat.FrstName);
HTM_BR ();
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
HTM_TR_End ();

View File

@ -199,8 +199,7 @@ static void TmlCom_ShowAuthorPhoto (struct Usr_Data *UsrDat)
/* Author's photo */
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
true); // Use unique id
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
/* End container */
HTM_DIV_End ();
@ -617,7 +616,6 @@ static void TmlCom_WriteAuthorName (const struct Usr_Data *UsrDat) // Author
/***** Show user's name inside form to go to user's public profile *****/
/* Begin form */
// Frm_BeginFormUnique (ActSeeOthPubPrf);
Frm_BeginForm (ActSeeOthPubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);

View File

@ -224,7 +224,6 @@ void TmlFrm_FormFavSha (const struct Tml_Form *Form)
ParamStr,
Gbl.Usrs.Other.UsrDat.EnUsrCod) < 0)
Err_NotEnoughMemoryExit ();
// Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,"timeline",OnSubmit);
Frm_BeginFormAnchorOnSubmit (ActUnk,"timeline",OnSubmit);
free (OnSubmit);
Ico_PutIconLink (Form->Icon,Form->Color,
@ -239,7 +238,6 @@ void TmlFrm_FormFavSha (const struct Tml_Form *Form)
Gbl.Session.Id,
ParamStr) < 0)
Err_NotEnoughMemoryExit ();
// Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,NULL,OnSubmit);
Frm_BeginFormAnchorOnSubmit (ActUnk,NULL,OnSubmit);
free (OnSubmit);
Ico_PutIconLink (Form->Icon,Form->Color,
@ -301,7 +299,6 @@ void TmlFrm_FormToShowHiddenComms (long NotCod,
Err_NotEnoughMemoryExit ();
Anchor = NULL;
}
// Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,Anchor,OnSubmit);
Frm_BeginFormAnchorOnSubmit (ActUnk,Anchor,OnSubmit);
free (OnSubmit);

View File

@ -273,7 +273,7 @@ static void TmlNot_WriteNote (const struct Tml_Timeline *Timeline,
Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
/***** Left top: author's photo *****/
TmlNot_ShowAuthorPhoto (&UsrDat,true); // Use unique id
TmlNot_ShowAuthorPhoto (&UsrDat);
/***** Right top: author's name, time, and content *****/
TmlNot_WriteAuthorTimeAndContent (Not,&UsrDat);
@ -289,7 +289,7 @@ static void TmlNot_WriteNote (const struct Tml_Timeline *Timeline,
/*********************** Show photo of author of a note **********************/
/*****************************************************************************/
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat,bool FormUnique)
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat)
{
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
{
@ -304,8 +304,7 @@ void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat,bool FormUnique)
/***** Photo *****/
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
FormUnique);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
/***** End container *****/
HTM_DIV_End ();
@ -352,7 +351,6 @@ void TmlNot_WriteAuthorName (const struct Usr_Data *UsrDat,
/***** Show user's name inside form to go to user's public profile *****/
/* Begin form */
// Frm_BeginFormUnique (ActSeeOthPubPrf);
Frm_BeginForm (ActSeeOthPubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
@ -624,7 +622,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
{
case TmlNot_INS_DOC_PUB_FILE:
case TmlNot_INS_SHA_PUB_FILE:
// Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
Brw_PutHiddenParamFilCod (Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution
@ -632,7 +629,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
break;
case TmlNot_CTR_DOC_PUB_FILE:
case TmlNot_CTR_SHA_PUB_FILE:
// Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
Brw_PutHiddenParamFilCod (Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center
@ -640,7 +636,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
break;
case TmlNot_DEG_DOC_PUB_FILE:
case TmlNot_DEG_SHA_PUB_FILE:
// Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
Brw_PutHiddenParamFilCod (Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree
@ -648,7 +643,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
break;
case TmlNot_CRS_DOC_PUB_FILE:
case TmlNot_CRS_SHA_PUB_FILE:
// Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
Brw_PutHiddenParamFilCod (Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
@ -656,8 +650,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
break;
case TmlNot_CALL_FOR_EXAM:
Frm_SetAnchorStr (Not->Cod,&Anchor);
// Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type],
// Anchor); // Locate on this specific exam
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],
Anchor); // Locate on this specific exam
Frm_FreeAnchorStr (Anchor);
@ -668,7 +660,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
case TmlNot_POST: // Not applicable
return;
case TmlNot_FORUM_POST:
// Frm_BeginFormUnique (For_ActionsSeeFor[Forums->Forum.Type]);
Frm_BeginForm (For_ActionsSeeFor[Forums->Forum.Type]);
For_PutAllHiddenParamsForum (1, // Page of threads = first
1, // Page of posts = first
@ -682,8 +673,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
break;
case TmlNot_NOTICE:
Frm_SetAnchorStr (Not->Cod,&Anchor);
// Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type],
// Anchor);
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],Anchor);
Frm_FreeAnchorStr (Anchor);
Not_PutHiddenParamNotCod (Not->Cod);

View File

@ -93,7 +93,7 @@ void TmlNot_CheckAndWriteNoteWithTopMsg (const struct Tml_Timeline *Timeline,
const struct TmlNot_Note *Not,
Tml_TopMessage_t TopMessage,
long PublisherCod);
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat,bool FormUnique);
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat);
void TmlNot_WriteAuthorName (const struct Usr_Data *UsrDat,
const char *Class);

View File

@ -159,7 +159,7 @@ void TmlPst_PutPhotoAndFormToWriteNewPost (struct Tml_Timeline *Timeline)
HTM_LI_Begin ("class=\"Tml_WIDTH\"");
/***** Left: write author's photo (my photo) *****/
TmlNot_ShowAuthorPhoto (&Gbl.Usrs.Me.UsrDat,false); // Don't use unique id
TmlNot_ShowAuthorPhoto (&Gbl.Usrs.Me.UsrDat);
/***** Right: author's name, time, textarea *****/
TmlPst_PutFormToWriteNewPost (Timeline);

View File

@ -225,8 +225,7 @@ static void TmlUsr_ListSharersOrFavers (MYSQL_RES **mysql_res,
/* User's photo */
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
true); // Use unique id
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
/* End container */
HTM_DIV_End ();

View File

@ -1384,8 +1384,7 @@ void Usr_WriteLoggedUsrHead (void)
/***** Show my photo *****/
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Me.UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
/***** User's name *****/
if (Gbl.Usrs.Me.UsrDat.FrstName[0])
@ -2208,8 +2207,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct Usr_Data *UsrDat,
/***** Show user's photo *****/
HTM_TD_Begin ("class=\"CM %s\"",BgColor);
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
}
@ -2260,8 +2258,7 @@ static void Usr_WriteRowGstAllData (struct Usr_Data *UsrDat)
/***** Show guest's photo *****/
HTM_TD_Begin ("class=\"%s LM\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
HTM_TD_End ();
}
@ -2355,8 +2352,7 @@ static void Usr_WriteRowStdAllData (struct Usr_Data *UsrDat,char *GroupNames)
/***** Show student's photo *****/
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
HTM_TD_End ();
}
@ -2465,8 +2461,7 @@ static void Usr_WriteRowTchAllData (struct Usr_Data *UsrDat)
/***** Show teacher's photo *****/
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
HTM_TD_End ();
}
@ -2550,8 +2545,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct Usr_Data *UsrDat)
/***** Show administrator's photo *****/
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
}
@ -6162,8 +6156,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
/***** Show photo *****/
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
ClassPhoto[ClassPhotoType][Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[ClassPhotoType][Gbl.Prefs.PhotoShape],Pho_ZOOM);
/***** Photo foot *****/
HTM_DIV_Begin ("class=\"CLASSPHOTO_CAPTION CLASSPHOTO_%s\"",
@ -6357,7 +6350,7 @@ void Usr_WriteAuthor1Line (long UsrCod,bool Hidden)
/***** Show photo *****/
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
/***** Write name *****/
HTM_DIV_Begin ("class=\"AUTHOR_1_LINE %s_%s\"",
@ -6398,8 +6391,7 @@ void Usr_ShowTableCellWithUsrData (struct Usr_Data *UsrDat,unsigned NumRows)
else
HTM_TD_Begin ("class=\"LT LINE_BOTTOM %s\"",The_GetColorRows ());
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
/***** User's IDs and name *****/