mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-05 16:25:29 +02:00
Version 16.167.13
This commit is contained in:
parent
34a735187b
commit
bef398f778
|
@ -209,13 +209,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.167.12 (2017-03-26)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.167.13 (2017-03-26)"
|
||||
#define CSS_FILE "swad16.166.css"
|
||||
#define JS_FILE "swad16.144.js"
|
||||
|
||||
// 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 16.167.13:Mar 26, 2017 Code refactoring in uploading of photos. (? lines)
|
||||
Version 16.167.12:Mar 26, 2017 Code refactoring in edition of institutions. (217685 lines)
|
||||
Version 16.167.11:Mar 26, 2017 Code refactoring in edition of degrees. (217686 lines)
|
||||
Version 16.167.10:Mar 26, 2017 Code refactoring in edition of courses. (217688 lines)
|
||||
|
|
15
swad_photo.c
15
swad_photo.c
|
@ -441,7 +441,8 @@ void Pho_ReqRemoveMyPhoto (void)
|
|||
void Pho_RemoveMyPhoto1 (void)
|
||||
{
|
||||
/***** Remove photo *****/
|
||||
Gbl.Error = !Pho_RemovePhoto (&Gbl.Usrs.Me.UsrDat);
|
||||
Gbl.AlertType = Pho_RemovePhoto (&Gbl.Usrs.Me.UsrDat) ? Lay_SUCCESS :
|
||||
Lay_WARNING;
|
||||
|
||||
/***** The link to my photo is not valid now, so build it again before writing the web page *****/
|
||||
Gbl.Usrs.Me.MyPhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL);
|
||||
|
@ -451,8 +452,8 @@ void Pho_RemoveMyPhoto2 (void)
|
|||
{
|
||||
extern const char *Txt_Photo_removed;
|
||||
|
||||
if (!Gbl.Error)
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Photo_removed);
|
||||
if (Gbl.AlertType == Lay_SUCCESS)
|
||||
Lay_ShowAlert (Gbl.AlertType,Txt_Photo_removed);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -828,10 +829,10 @@ static void Pho_UpdatePhoto1 (struct UsrData *UsrDat)
|
|||
/* Remove the user from the list of users without photo */
|
||||
Pho_RemoveUsrFromTableClicksWithoutPhoto (UsrDat->UsrCod);
|
||||
|
||||
Gbl.Error = false;
|
||||
Gbl.AlertType = Lay_ERROR;
|
||||
}
|
||||
else
|
||||
Gbl.Error = true;
|
||||
Gbl.AlertType = Lay_SUCCESS;
|
||||
}
|
||||
|
||||
static void Pho_UpdatePhoto2 (void)
|
||||
|
@ -862,10 +863,10 @@ static void Pho_UpdatePhoto2 (void)
|
|||
"</table>");
|
||||
|
||||
/***** Show message *****/
|
||||
if (Gbl.Error) // The file with the selected photo does not exist!
|
||||
if (Gbl.AlertType == Lay_ERROR) // The file with the selected photo does not exist!
|
||||
Lay_ShowErrorAndExit ("Selected photo does not exist.");
|
||||
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Photo_has_been_updated);
|
||||
Lay_ShowAlert (Gbl.AlertType,Txt_Photo_has_been_updated);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue
Block a user