Version 14.107.4

This commit is contained in:
Antonio Cañas Vargas 2015-04-03 00:15:51 +02:00
parent d4c7f076bc
commit 89396a19fe
5 changed files with 23 additions and 26 deletions

View File

@ -361,20 +361,14 @@ void ID_WriteUsrIDs (struct UsrData *UsrDat,bool ICanSeeUsrID)
void ID_PutLinkToChangeUsrIDs (void)
{
extern const char *Txt_Change_IDs;
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
/***** Link for changing the password *****/
if (Pwd_CheckIfICanChangeOtherUsrPassword (Gbl.Usrs.Other.UsrDat.UsrCod))
{
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
Act_PutContextualLink (ActFrmUsrAcc,NULL,
"arroba",Txt_Change_IDs);
else // Not me
Act_PutContextualLink (ActFrmIDsOthUsr,Usr_PutParamOtherUsrCodEncrypted,
"arroba",Txt_Change_IDs);
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
Act_PutContextualLink (ActFrmUsrAcc,NULL,
"arroba",Txt_Change_IDs);
else // Not me
Act_PutContextualLink (ActFrmIDsOthUsr,Usr_PutParamOtherUsrCodEncrypted,
"arroba",Txt_Change_IDs);
}
/*****************************************************************************/

View File

@ -103,11 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.107.3 (2015/04/02)"
#define Log_PLATFORM_VERSION "SWAD 14.107.4 (2015/04/03)"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
Version 14.107.4: Apr 03, 2015 Fixed bugs when changing user's ID, password and photo. (183699 lines)
Version 14.107.3: Apr 02, 2015 Changes in icons in attendance events.
Fixed bug in assignments. (183702 lines)
Version 14.107.2: Apr 02, 2015 Changes in icons in surveys. (183717 lines)

View File

@ -2833,7 +2833,7 @@ static void Enr_ShowFormToEditOtherUsr (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
if (Pwd_CheckIfICanChangeOtherUsrPassword (Gbl.Usrs.Other.UsrDat.UsrCod))
{
ID_PutLinkToChangeUsrIDs (); // Put link (form) to change user's IDs
ID_PutLinkToChangeUsrIDs (); // Put link (form) to change user's IDs
Pwd_PutLinkToChangeOtherUsrPassword (); // Put link (form) to change user's password
}
if (Pho_CheckIfICanChangeOtherUsrPhoto (Gbl.Usrs.Other.UsrDat.UsrCod))

View File

@ -814,14 +814,13 @@ void Pwd_PutLinkToChangeMyPassword (void)
void Pwd_PutLinkToChangeOtherUsrPassword (void)
{
extern const char *Txt_Change_password;
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
/***** Link for changing the password *****/
if (Pwd_CheckIfICanChangeOtherUsrPassword (Gbl.Usrs.Other.UsrDat.UsrCod))
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
Pwd_PutLinkToChangeMyPassword ();
else // Not me
Act_PutContextualLink (ActFrmPwdOthUsr,Usr_PutParamOtherUsrCodEncrypted,
"key",Txt_Change_password);
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
/*****************************************************************************/

View File

@ -152,13 +152,11 @@ void Pho_PutLinkToChangeMyPhoto (void)
{
extern const char *Txt_Change_photo;
extern const char *Txt_Upload_photo;
bool PhotoExists;
/***** Link for changing / uploading the photo *****/
PhotoExists = Gbl.Usrs.Me.MyPhotoExists;
Act_PutContextualLink (ActReqMyPho,NULL,
"photo",PhotoExists ? Txt_Change_photo :
Txt_Upload_photo);
"photo",Gbl.Usrs.Me.MyPhotoExists ? Txt_Change_photo :
Txt_Upload_photo);
}
/*****************************************************************************/
@ -173,10 +171,15 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void)
char PhotoURL[PATH_MAX+1];
/***** Link for changing / uploading the photo *****/
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
Act_PutContextualLink (ActReqUsrPho,Usr_PutParamOtherUsrCodEncrypted,
"photo",PhotoExists ? Txt_Change_photo :
Txt_Upload_photo);
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
Pho_PutLinkToChangeMyPhoto ();
else // Not me
{
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
Act_PutContextualLink (ActReqUsrPho,Usr_PutParamOtherUsrCodEncrypted,
"photo",PhotoExists ? Txt_Change_photo :
Txt_Upload_photo);
}
}
/*****************************************************************************/