mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-15 21:24:07 +02:00
Version 15.73
This commit is contained in:
parent
b0ad3dc1e1
commit
b7014a963c
|
@ -2590,9 +2590,9 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActUpdMyPho */{ 694,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pho_UpdateMyPhoto1 ,Pho_UpdateMyPhoto2 ,NULL},
|
||||
/* ActRemMyPho */{ 428,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pho_RemoveMyPhoto1 ,Pho_RemoveMyPhoto2 ,NULL},
|
||||
|
||||
/* ActEdiPri */{1403,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pri_EditMyPrivacy ,NULL},
|
||||
/* ActChgPriPho */{ 774,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_ChangePhotoVisibility ,NULL},
|
||||
/* ActChgPriPrf */{1404,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_ChangeProfileVisibility ,NULL},
|
||||
/* ActEdiPri */{1403,-1,TabPrf,ActEdiPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pri_EditMyPrivacy ,NULL},
|
||||
/* ActChgPriPho */{ 774,-1,TabPrf,ActEdiPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_ChangePhotoVisibility ,NULL},
|
||||
/* ActChgPriPrf */{1404,-1,TabPrf,ActEdiPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_ChangeProfileVisibility ,NULL},
|
||||
|
||||
/* ActReqEdiMyIns */{1165,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Rec_ShowFormMyInsCtrDpt ,NULL},
|
||||
/* ActChgCtyMyIns */{1166,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Rec_ChgCountryOfMyInstitution ,NULL},
|
||||
|
|
|
@ -117,12 +117,15 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.72.7 (2015-12-24)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.73 (2015-12-24)"
|
||||
#define CSS_FILE "swad15.72.4.css"
|
||||
|
||||
// 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 15.73: Dec 24, 2015 Fixed bug in privacy form.
|
||||
Privacy is moved to preferences.
|
||||
Default privacy is changed from "user" to "system". (187704 lines)
|
||||
Version 15.72.7: Dec 24, 2015 Remove message to teachers to verify indicators. (187695 lines)
|
||||
Version 15.72.6: Dec 24, 2015 Debug message removed. (187796 lines)
|
||||
Version 15.72.5: Dec 24, 2015 Fixed bugs while sending a message to a unique recipient. (187794 lines)
|
||||
|
|
|
@ -1112,7 +1112,7 @@ void Pho_ChangePhotoVisibility (void)
|
|||
char Query[128];
|
||||
|
||||
/***** Get param with public/private photo *****/
|
||||
Gbl.Usrs.Me.UsrDat.PhotoVisibility = Pri_GetParamVisibility ();
|
||||
Gbl.Usrs.Me.UsrDat.PhotoVisibility = Pri_GetParamVisibility ("VisPho");
|
||||
|
||||
/***** Store public/private photo in database *****/
|
||||
sprintf (Query,"UPDATE usr_data SET PhotoVisibility='%s'"
|
||||
|
|
|
@ -108,9 +108,12 @@ void Pre_EditPrefs (void)
|
|||
"</tr>"
|
||||
"</table>");
|
||||
|
||||
/***** Automatic e-mail to notify of new events *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
{
|
||||
/***** Form to set my preferences on privacy *****/
|
||||
Pri_EditMyPrivacy ();
|
||||
|
||||
/***** Automatic e-mail to notify of new events *****/
|
||||
Ntf_PutFormChangeNotifSentByEMail ();
|
||||
|
||||
Str_GetMailBox (Gbl.Usrs.Me.UsrDat.Email,MailDomain,Usr_MAX_BYTES_USR_EMAIL);
|
||||
|
|
|
@ -60,7 +60,8 @@ const char *Pri_VisibilityDB[Pri_NUM_OPTIONS_PRIVACY] =
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pri_PutFormVisibility (const char *TxtLabel,Act_Action_t Action,
|
||||
static void Pri_PutFormVisibility (const char *TxtLabel,
|
||||
Act_Action_t Action,const char *ParamName,
|
||||
Pri_Visibility_t CurrentVisibilityInDB);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -90,11 +91,13 @@ void Pri_EditMyPrivacy (void)
|
|||
Lay_StartRoundFrameTable (NULL,2,Txt_Privacy);
|
||||
|
||||
/***** Edit photo visibility *****/
|
||||
Pri_PutFormVisibility (Txt_Photo,ActChgPriPho,
|
||||
Pri_PutFormVisibility (Txt_Photo,
|
||||
ActChgPriPho,"VisPho",
|
||||
Gbl.Usrs.Me.UsrDat.PhotoVisibility);
|
||||
|
||||
/***** Edit public profile visibility *****/
|
||||
Pri_PutFormVisibility (Txt_Public_profile,ActChgPriPrf,
|
||||
Pri_PutFormVisibility (Txt_Public_profile,
|
||||
ActChgPriPrf,"VisPrf",
|
||||
Gbl.Usrs.Me.UsrDat.ProfileVisibility);
|
||||
|
||||
/***** End table *****/
|
||||
|
@ -105,7 +108,8 @@ void Pri_EditMyPrivacy (void)
|
|||
/************************** Select photo visibility **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pri_PutFormVisibility (const char *TxtLabel,Act_Action_t Action,
|
||||
static void Pri_PutFormVisibility (const char *TxtLabel,
|
||||
Act_Action_t Action,const char *ParamName,
|
||||
Pri_Visibility_t CurrentVisibilityInDB)
|
||||
{
|
||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
|
@ -128,8 +132,8 @@ void Pri_PutFormVisibility (const char *TxtLabel,Act_Action_t Action,
|
|||
Visibility++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<li class=\"DAT\">"
|
||||
"<input type=\"radio\" name=\"Visibility\" value=\"%u\"",
|
||||
(unsigned) Visibility);
|
||||
"<input type=\"radio\" name=\"%s\" value=\"%u\"",
|
||||
ParamName,(unsigned) Visibility);
|
||||
if (Visibility == CurrentVisibilityInDB)
|
||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
|
||||
|
@ -166,12 +170,12 @@ Pri_Visibility_t Pri_GetVisibilityFromStr (const char *Str)
|
|||
/**************** Get parameter with visibility from form ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Pri_GetParamVisibility (void)
|
||||
Pri_Visibility_t Pri_GetParamVisibility (const char *ParamName)
|
||||
{
|
||||
char UnsignedStr[10+1];
|
||||
unsigned UnsignedNum;
|
||||
|
||||
Par_GetParToText ("Visibility",UnsignedStr,10);
|
||||
Par_GetParToText (ParamName,UnsignedStr,10);
|
||||
if (UnsignedStr[0])
|
||||
{
|
||||
if (sscanf (UnsignedStr,"%u",&UnsignedNum) != 1)
|
||||
|
@ -180,6 +184,7 @@ bool Pri_GetParamVisibility (void)
|
|||
Lay_ShowErrorAndExit ("Visibility is missing.");
|
||||
return (Pri_Visibility_t) UnsignedNum;
|
||||
}
|
||||
|
||||
return Pri_VISIBILITY_DEFAULT;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ typedef enum
|
|||
Pri_VISIBILITY_WORLD = 3, // Public, visible by all the people, even unlogged visitors
|
||||
} Pri_Visibility_t;
|
||||
|
||||
#define Pri_VISIBILITY_DEFAULT Pri_VISIBILITY_USER
|
||||
#define Pri_VISIBILITY_DEFAULT Pri_VISIBILITY_SYSTEM
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Public prototypes *****************************/
|
||||
|
@ -52,7 +52,7 @@ void Pri_PutLinkToChangeMyPrivacy (void);
|
|||
void Pri_EditMyPrivacy (void);
|
||||
|
||||
Pri_Visibility_t Pri_GetVisibilityFromStr (const char *Str);
|
||||
bool Pri_GetParamVisibility (void);
|
||||
Pri_Visibility_t Pri_GetParamVisibility (const char *ParamName);
|
||||
|
||||
bool Pri_ShowIsAllowed (Pri_Visibility_t Visibility,long OtherUsrCod);
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ void Prf_ChangeProfileVisibility (void)
|
|||
char Query[128];
|
||||
|
||||
/***** Get param with public/private photo *****/
|
||||
Gbl.Usrs.Me.UsrDat.ProfileVisibility = Pri_GetParamVisibility ();
|
||||
Gbl.Usrs.Me.UsrDat.ProfileVisibility = Pri_GetParamVisibility ("VisPrf");
|
||||
|
||||
/***** Store public/private photo in database *****/
|
||||
sprintf (Query,"UPDATE usr_data SET ProfileVisibility='%s'"
|
||||
|
|
|
@ -27551,7 +27551,6 @@ const char *Txt_Privacy =
|
|||
"Privacidade";
|
||||
#endif
|
||||
|
||||
|
||||
const char *Txt_PRIVACY_OPTIONS[Pri_NUM_OPTIONS_PRIVACY] =
|
||||
{ // Pri_VISIBILITY_USER
|
||||
#if L==1
|
||||
|
|
Loading…
Reference in New Issue
Block a user