mirror of https://github.com/acanas/swad-core.git
Version 18.46.11
This commit is contained in:
parent
afcae28b00
commit
80c00bb753
|
@ -748,7 +748,6 @@ void ID_RemoveMyUsrID (void)
|
|||
|
||||
void ID_RemoveOtherUsrID (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool ItsMe;
|
||||
|
||||
/***** Get other user's code from form and get user's data *****/
|
||||
|
@ -767,10 +766,10 @@ void ID_RemoveOtherUsrID (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // User not found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -898,10 +897,10 @@ void ID_NewOtherUsrID (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // User not found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -487,8 +487,6 @@ void Acc_ShowFormChgMyAccount (void)
|
|||
|
||||
void Acc_ShowFormChgOtherUsrAccount (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user whose account must be changed *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
{
|
||||
|
@ -522,10 +520,10 @@ void Acc_ShowFormChgOtherUsrAccount (void)
|
|||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // User not found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -846,7 +844,6 @@ void Acc_AfterCreationNewAccount (void)
|
|||
|
||||
void Acc_GetUsrCodAndRemUsrGbl (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool Error = false;
|
||||
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
|
@ -860,7 +857,7 @@ void Acc_GetUsrCodAndRemUsrGbl (void)
|
|||
Error = true;
|
||||
|
||||
if (Error)
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -948,7 +945,6 @@ static void Acc_AskIfRemoveOtherUsrAccount (void)
|
|||
{
|
||||
extern const char *Txt_Do_you_really_want_to_completely_eliminate_the_following_user;
|
||||
extern const char *Txt_Eliminate_user_account;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
if (Usr_ChkIfUsrCodExists (Gbl.Usrs.Other.UsrDat.UsrCod))
|
||||
{
|
||||
|
@ -970,7 +966,7 @@ static void Acc_AskIfRemoveOtherUsrAccount (void)
|
|||
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -340,7 +340,6 @@ void Agd_ShowUsrAgenda (void)
|
|||
{
|
||||
extern const char *Hlp_PROFILE_Agenda_public_agenda;
|
||||
extern const char *Txt_Public_agenda_USER;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool ItsMe;
|
||||
bool Error = true;
|
||||
|
||||
|
@ -371,7 +370,7 @@ void Agd_ShowUsrAgenda (void)
|
|||
}
|
||||
|
||||
if (Error)
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -383,7 +382,6 @@ void Agd_ShowOtherAgendaAfterLogIn (void)
|
|||
extern const char *Hlp_PROFILE_Agenda_public_agenda;
|
||||
extern const unsigned Txt_Current_CGI_SWAD_Language;
|
||||
extern const char *Txt_Public_agenda_USER;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
extern const char *Txt_Switching_to_LANGUAGE[1 + Lan_NUM_LANGUAGES];
|
||||
bool ItsMe;
|
||||
|
||||
|
@ -415,7 +413,7 @@ void Agd_ShowOtherAgendaAfterLogIn (void)
|
|||
Box_EndBox ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else
|
||||
/* The current language is not my preferred language
|
||||
|
|
11
swad_alert.c
11
swad_alert.c
|
@ -229,3 +229,14 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c
|
|||
fprintf (Gbl.F.Out,"</div>"
|
||||
"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Show form to change another user's account ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
|
|
@ -72,4 +72,6 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c
|
|||
void (*FuncParams) (),
|
||||
Btn_Button_t Button,const char *TxtButton);
|
||||
|
||||
void Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -383,7 +383,6 @@ OPTIMIZE TABLE debug;
|
|||
|
||||
// TODO: Revisar todos los Ale_ShowAlertAndButton
|
||||
|
||||
// TODO: Pasar a una función Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
// TODO: Pasar a una función Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project.");
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -405,10 +404,11 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.46.10 (2019-02-16)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.46.11 (2019-02-16)"
|
||||
#define CSS_FILE "swad18.41.1.css"
|
||||
#define JS_FILE "swad18.32.1.js"
|
||||
/*
|
||||
Version 18.46.11: Feb 16, 2019 Code refactoring related to alerts. (237701 lines)
|
||||
Version 18.46.10: Feb 16, 2019 Code refactoring related to alerts. (237729 lines)
|
||||
Version 18.46.9: Feb 16, 2019 Code refactoring related to alerts. (237809 lines)
|
||||
Version 18.46.8: Feb 16, 2019 Code refactoring related to alerts. (237863 lines)
|
||||
|
|
|
@ -82,7 +82,6 @@ static void Dup_PutButtonToRemoveFromListOfDupUsrs (const struct UsrData *UsrDat
|
|||
void Dup_ReportUsrAsPossibleDuplicate (void)
|
||||
{
|
||||
extern const char *Txt_Thank_you_for_reporting_a_possible_duplicate_user;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool ItsMe;
|
||||
|
||||
/***** Get user to be reported as possible duplicate *****/
|
||||
|
@ -105,10 +104,10 @@ void Dup_ReportUsrAsPossibleDuplicate (void)
|
|||
Ale_ShowAlert (Ale_SUCCESS,Txt_Thank_you_for_reporting_a_possible_duplicate_user);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -244,13 +243,11 @@ void Dup_ListDuplicateUsrs (void)
|
|||
|
||||
void Dup_GetUsrCodAndListSimilarUsrs (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user to be removed from list of possible duplicates *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
Dup_ListSimilarUsrs ();
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
static void Dup_ListSimilarUsrs (void)
|
||||
|
@ -444,8 +441,6 @@ static void Dup_PutButtonToRemoveFromListOfDupUsrs (const struct UsrData *UsrDat
|
|||
|
||||
void Dup_RemoveUsrFromListDupUsrs (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user to be removed from list of possible duplicates *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
{
|
||||
|
@ -459,7 +454,7 @@ void Dup_RemoveUsrFromListDupUsrs (void)
|
|||
Dup_ListDuplicateUsrs ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -2110,7 +2110,6 @@ void Enr_AskIfRejectSignUp (void)
|
|||
extern const char *Txt_Do_you_really_want_to_reject_the_enrolment_request_;
|
||||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Reject;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
Rol_Role_t Role;
|
||||
|
||||
|
@ -2158,7 +2157,7 @@ void Enr_AskIfRejectSignUp (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2169,7 +2168,6 @@ void Enr_RejectSignUp (void)
|
|||
{
|
||||
extern const char *Txt_THE_USER_X_is_already_enroled_in_the_course_Y;
|
||||
extern const char *Txt_Enrolment_of_X_rejected;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user's code *****/
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
@ -2192,7 +2190,7 @@ void Enr_RejectSignUp (void)
|
|||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
|
||||
/* Show again the rest of registrarion requests */
|
||||
Enr_ShowEnrolmentRequests ();
|
||||
|
@ -3369,7 +3367,6 @@ void Enr_AddAdmToDeg (void)
|
|||
|
||||
static void Enr_AddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool ICanRegister;
|
||||
|
||||
if (Cod > 0)
|
||||
|
@ -3391,10 +3388,10 @@ static void Enr_AddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3442,18 +3439,16 @@ void Enr_ReqRemMeFromCrs (void)
|
|||
|
||||
void Enr_ReqRemUsrFromCrs (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user to be removed *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
{
|
||||
if (Enr_CheckIfICanRemUsrFromCrs ())
|
||||
Enr_AskIfRemoveUsrFromCrs (&Gbl.Usrs.Other.UsrDat);
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3588,7 +3583,6 @@ static void Enr_ReqRemOrRemAdm (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr,Sco_Scope_t
|
|||
long Cod,const char *InsCtrDegName)
|
||||
{
|
||||
extern const char *Txt_THE_USER_X_is_not_an_administrator_of_Y;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool ItsMe;
|
||||
bool ICanRemove;
|
||||
|
||||
|
@ -3624,10 +3618,10 @@ static void Enr_ReqRemOrRemAdm (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr,Sco_Scope_t
|
|||
Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3640,7 +3634,6 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
extern const char *Txt_THE_USER_X_is_already_an_administrator_of_Y;
|
||||
extern const char *Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_X;
|
||||
extern const char *Txt_Register_user_IN_A_COURSE_OR_DEGREE;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
static const Act_Action_t Enr_ActNewAdm[Sco_NUM_SCOPES] =
|
||||
{
|
||||
ActUnk, // Sco_SCOPE_UNK
|
||||
|
@ -3689,10 +3682,10 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
}
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4005,10 +3998,8 @@ void Enr_ModifyUsr1 (void)
|
|||
|
||||
void Enr_ModifyUsr2 (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
if (Gbl.Alert.Type == Ale_WARNING)
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
else // No error
|
||||
switch (Gbl.Usrs.RegRemAction)
|
||||
{
|
||||
|
@ -4078,7 +4069,6 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat)
|
|||
extern const char *Txt_Do_you_really_want_to_remove_the_following_user_from_the_course_X;
|
||||
extern const char *Txt_Remove_me_from_this_course;
|
||||
extern const char *Txt_Remove_user_from_this_course;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool ItsMe;
|
||||
Act_Action_t NextAction;
|
||||
|
||||
|
@ -4125,7 +4115,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat)
|
|||
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
|
||||
}
|
||||
else // User does not belong to current course
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -643,8 +643,6 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
|
|||
|
||||
void Fol_ListFollowing (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user to view user he/she follows *****/
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
||||
|
@ -653,7 +651,7 @@ void Fol_ListFollowing (void)
|
|||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat))
|
||||
Fol_ListFollowingUsr (&Gbl.Usrs.Other.UsrDat);
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // If user not specified, view my profile
|
||||
Fol_ListFollowingUsr (&Gbl.Usrs.Me.UsrDat);
|
||||
|
@ -662,7 +660,6 @@ void Fol_ListFollowing (void)
|
|||
static void Fol_ListFollowingUsr (struct UsrData *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Following;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned long NumUsrs;
|
||||
|
@ -719,7 +716,7 @@ static void Fol_ListFollowingUsr (struct UsrData *UsrDat)
|
|||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -728,8 +725,6 @@ static void Fol_ListFollowingUsr (struct UsrData *UsrDat)
|
|||
|
||||
void Fol_ListFollowers (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user to view user he/she follows *****/
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
||||
|
@ -738,7 +733,7 @@ void Fol_ListFollowers (void)
|
|||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat))
|
||||
Fol_ListFollowersUsr (&Gbl.Usrs.Other.UsrDat);
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // If user not specified, view my profile
|
||||
Fol_ListFollowersUsr (&Gbl.Usrs.Me.UsrDat);
|
||||
|
@ -747,7 +742,6 @@ void Fol_ListFollowers (void)
|
|||
static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Followers;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned long NumUsrs;
|
||||
|
@ -812,7 +806,7 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
14
swad_mail.c
14
swad_mail.c
|
@ -1417,8 +1417,6 @@ void Mai_RemoveMyUsrEmail (void)
|
|||
|
||||
void Mai_RemoveOtherUsrEmail (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get other user's code from form and get user's data *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
{
|
||||
|
@ -1431,10 +1429,10 @@ void Mai_RemoveOtherUsrEmail (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // User not found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1444,7 +1442,6 @@ void Mai_RemoveOtherUsrEmail (void)
|
|||
static void Mai_RemoveEmail (struct UsrData *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Email_X_removed;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
char Email[Cns_MAX_BYTES_EMAIL_ADDRESS + 1];
|
||||
|
||||
if (Usr_ICanEditOtherUsr (UsrDat))
|
||||
|
@ -1466,7 +1463,7 @@ static void Mai_RemoveEmail (struct UsrData *UsrDat)
|
|||
Mai_GetEmailFromUsrCod (UsrDat);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1502,7 +1499,6 @@ void May_NewMyUsrEmail (void)
|
|||
|
||||
void Mai_NewOtherUsrEmail (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool ItsMe;
|
||||
|
||||
/***** Get other user's code from form and get user's data *****/
|
||||
|
@ -1518,10 +1514,10 @@ void Mai_NewOtherUsrEmail (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // User not found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -461,7 +461,6 @@ void Nck_RemoveMyNick (void)
|
|||
void Nck_RemoveOtherUsrNick (void)
|
||||
{
|
||||
extern const char *Txt_Nickname_X_removed;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
char NicknameWithoutArroba[Nck_MAX_BYTES_NICKNAME_WITHOUT_ARROBA + 1];
|
||||
|
||||
/***** Get user whose nick must be removed *****/
|
||||
|
@ -487,10 +486,10 @@ void Nck_RemoveOtherUsrNick (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // User not found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -525,8 +524,6 @@ void Nck_UpdateMyNick (void)
|
|||
|
||||
void Nck_UpdateOtherUsrNick (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user whose nick must be changed *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
{
|
||||
|
@ -539,10 +536,10 @@ void Nck_UpdateOtherUsrNick (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // User not found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -192,8 +192,6 @@ void Pwd_UpdateMyPwd (void)
|
|||
|
||||
void Pwd_UpdateOtherUsrPwd (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get other user's code from form and get user's data *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
{
|
||||
|
@ -201,10 +199,10 @@ void Pwd_UpdateOtherUsrPwd (void)
|
|||
/***** Check and update password *****/
|
||||
Pwd_CheckAndUpdateNewPwd (&Gbl.Usrs.Other.UsrDat);
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // User not found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
22
swad_photo.c
22
swad_photo.c
|
@ -357,7 +357,6 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat)
|
|||
|
||||
void Pho_SendPhotoUsr (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool ItsMe;
|
||||
|
||||
/***** Get user whose photo must be sent or removed *****/
|
||||
|
@ -375,10 +374,10 @@ void Pho_SendPhotoUsr (void)
|
|||
Pho_ReqOtherUsrPhoto ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else // User not found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -401,8 +400,6 @@ void Pho_RecMyPhotoDetFaces (void)
|
|||
|
||||
void Pho_RecOtherUsrPhotoDetFaces (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user's code from form *****/
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
||||
|
@ -417,7 +414,7 @@ void Pho_RecOtherUsrPhotoDetFaces (void)
|
|||
Rec_ShowPublicSharedRecordOtherUsr ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -484,7 +481,6 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
extern const char *Txt_Do_you_really_want_to_remove_the_photo_of_X;
|
||||
extern const char *Txt_Remove_photo;
|
||||
extern const char *Txt_The_photo_no_longer_exists;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
Act_Action_t NextAction;
|
||||
|
||||
|
@ -532,10 +528,10 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
Ale_ShowAlert (Ale_INFO,Txt_The_photo_no_longer_exists);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
|
||||
/***** Show another user's record card *****/
|
||||
Rec_ShowPublicSharedRecordOtherUsr ();
|
||||
|
@ -547,8 +543,6 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
|
||||
void Pho_RemoveUsrPhoto (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user's code from form *****/
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
||||
|
@ -560,7 +554,7 @@ void Pho_RemoveUsrPhoto (void)
|
|||
Ale_ShowPendingAlert ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
|
||||
/***** Show another user's record card *****/
|
||||
Rec_ShowPublicSharedRecordOtherUsr ();
|
||||
|
@ -873,13 +867,11 @@ void Pho_UpdateMyPhoto2 (void)
|
|||
|
||||
void Pho_UpdateUsrPhoto1 (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user's code from form and user's data *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
Pho_UpdatePhoto1 (&Gbl.Usrs.Other.UsrDat);
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
void Pho_UpdateUsrPhoto2 (void)
|
||||
|
|
|
@ -210,7 +210,6 @@ void Prf_RequestUserProfile (void)
|
|||
|
||||
void Prf_GetUsrDatAndShowUserProfile (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
bool ItsMe;
|
||||
bool ProfileShown = false;
|
||||
|
||||
|
@ -238,7 +237,7 @@ void Prf_GetUsrDatAndShowUserProfile (void)
|
|||
if (!ProfileShown)
|
||||
{
|
||||
/* Show error message */
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
|
||||
/* Request a user's profile */
|
||||
Prf_RequestUserProfile ();
|
||||
|
|
|
@ -1924,7 +1924,6 @@ static void Prj_AddUsrToProject (Prj_RoleInProject_t RoleInProject)
|
|||
{
|
||||
extern const char *Txt_THE_USER_X_has_been_enroled_as_a_Y_in_the_project;
|
||||
extern const char *Txt_PROJECT_ROLES_SINGUL_abc[Prj_NUM_ROLES_IN_PROJECT];
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
long PrjCod;
|
||||
struct ListUsrCods ListUsrCods;
|
||||
unsigned NumUsr;
|
||||
|
@ -1972,7 +1971,7 @@ static void Prj_AddUsrToProject (Prj_RoleInProject_t RoleInProject)
|
|||
Usr_FreeListUsrCods (&ListUsrCods);
|
||||
}
|
||||
else // No users found
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
|
||||
/***** Put form to edit project again *****/
|
||||
Prj_RequestCreatOrEditPrj (PrjCod);
|
||||
|
@ -2004,7 +2003,6 @@ static void Prj_ReqRemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
|
|||
extern const char *Txt_PROJECT_ROLES_SINGUL_abc[Prj_NUM_ROLES_IN_PROJECT];
|
||||
extern const char *Txt_Remove_me_from_this_project;
|
||||
extern const char *Txt_Remove_user_from_this_project;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
static Act_Action_t ActionRemUsr[Prj_NUM_ROLES_IN_PROJECT] =
|
||||
{
|
||||
ActUnk, // Prj_ROLE_UNK, Unknown
|
||||
|
@ -2057,10 +2055,10 @@ static void Prj_ReqRemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
|
|||
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
|
||||
/***** Free memory of the project *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
|
@ -2092,7 +2090,6 @@ static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
|
|||
{
|
||||
extern const char *Txt_THE_USER_X_has_been_removed_as_a_Y_from_the_project_Z;
|
||||
extern const char *Txt_PROJECT_ROLES_SINGUL_abc[Prj_NUM_ROLES_IN_PROJECT];
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
struct Project Prj;
|
||||
bool ItsMe;
|
||||
|
||||
|
@ -2133,10 +2130,10 @@ static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
|
|||
Prj.Title);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
|
||||
/***** Free memory of the project *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
|
|
|
@ -9077,7 +9077,6 @@ void Usr_RemoveUsrFromUsrBanned (long UsrCod)
|
|||
|
||||
void Usr_PrintUsrQRCode (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
char NewNicknameWithArroba[Nck_MAX_BYTES_NICKNAME_FROM_FORM + 1];
|
||||
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
|
@ -9099,7 +9098,7 @@ void Usr_PrintUsrQRCode (void)
|
|||
Box_EndBox ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Acc_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue