mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-03 23:35:23 +02:00
Version18.86
This commit is contained in:
parent
c4b60ebe1c
commit
3ad087f987
|
@ -3556,6 +3556,13 @@ a.PAG:hover, .PAG_CUR
|
||||||
width:90px;
|
width:90px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********************************* Privacy *********************************/
|
||||||
|
|
||||||
|
.PRI_LIST
|
||||||
|
{
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
/********************************* Page foot *********************************/
|
/********************************* Page foot *********************************/
|
||||||
@media only screen and (max-width: 800px)
|
@media only screen and (max-width: 800px)
|
||||||
{ /* For mobile-phones */
|
{ /* For mobile-phones */
|
||||||
|
|
|
@ -12687,6 +12687,7 @@ SELECT degrees.ShortName,main_degree.MaxRole
|
||||||
WHERE degrees.DegCod=main_degree.DegCod;
|
WHERE degrees.DegCod=main_degree.DegCod;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE usr_data CHANGE COLUMN BasicProfileVisibility BaPrfVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown';
|
||||||
|
ALTER TABLE usr_data DROP COLUMN ExtendedProfileVisibility;
|
||||||
|
|
||||||
|
|
|
@ -1314,7 +1314,8 @@ CREATE TABLE IF NOT EXISTS usr_data (
|
||||||
DateFormat TINYINT NOT NULL DEFAULT 0,
|
DateFormat TINYINT NOT NULL DEFAULT 0,
|
||||||
Photo CHAR(43) NOT NULL DEFAULT '',
|
Photo CHAR(43) NOT NULL DEFAULT '',
|
||||||
PhotoVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',
|
PhotoVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',
|
||||||
ProfileVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',
|
BaPrfVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',
|
||||||
|
ExPrfVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',
|
||||||
CtyCod INT NOT NULL DEFAULT -1,
|
CtyCod INT NOT NULL DEFAULT -1,
|
||||||
InsCtyCod INT NOT NULL DEFAULT -1,
|
InsCtyCod INT NOT NULL DEFAULT -1,
|
||||||
InsCod INT NOT NULL DEFAULT -1,
|
InsCod INT NOT NULL DEFAULT -1,
|
||||||
|
@ -1342,7 +1343,8 @@ CREATE TABLE IF NOT EXISTS usr_data (
|
||||||
INDEX(FirstDayOfWeek),
|
INDEX(FirstDayOfWeek),
|
||||||
INDEX(DateFormat),
|
INDEX(DateFormat),
|
||||||
INDEX(PhotoVisibility),
|
INDEX(PhotoVisibility),
|
||||||
INDEX(ProfileVisibility),
|
INDEX(BaPrfVisibility),
|
||||||
|
INDEX(ExPrfVisibility),
|
||||||
INDEX(CtyCod),
|
INDEX(CtyCod),
|
||||||
INDEX(InsCtyCod),
|
INDEX(InsCtyCod),
|
||||||
INDEX(InsCod),
|
INDEX(InsCod),
|
||||||
|
|
|
@ -732,7 +732,7 @@ void Acc_CreateNewUsr (struct UsrData *UsrDat,bool CreatingMyOwnAccount)
|
||||||
" (EncryptedUsrCod,Password,"
|
" (EncryptedUsrCod,Password,"
|
||||||
"Surname1,Surname2,FirstName,Sex,"
|
"Surname1,Surname2,FirstName,Sex,"
|
||||||
"Theme,IconSet,Language,FirstDayOfWeek,DateFormat,"
|
"Theme,IconSet,Language,FirstDayOfWeek,DateFormat,"
|
||||||
"PhotoVisibility,ProfileVisibility,"
|
"PhotoVisibility,BaPrfVisibility,ExPrfVisibility,"
|
||||||
"CtyCod,"
|
"CtyCod,"
|
||||||
"LocalAddress,LocalPhone,"
|
"LocalAddress,LocalPhone,"
|
||||||
"FamilyAddress,FamilyPhone,"
|
"FamilyAddress,FamilyPhone,"
|
||||||
|
@ -742,7 +742,7 @@ void Acc_CreateNewUsr (struct UsrData *UsrDat,bool CreatingMyOwnAccount)
|
||||||
" ('%s','%s',"
|
" ('%s','%s',"
|
||||||
"'%s','%s','%s','%s',"
|
"'%s','%s','%s','%s',"
|
||||||
"'%s','%s','%s',%u,%u,"
|
"'%s','%s','%s',%u,%u,"
|
||||||
"'%s','%s',"
|
"'%s','%s','%s',"
|
||||||
"%ld,"
|
"%ld,"
|
||||||
"'%s','%s',"
|
"'%s','%s',"
|
||||||
"'%s','%s','%s',"
|
"'%s','%s','%s',"
|
||||||
|
@ -758,7 +758,8 @@ void Acc_CreateNewUsr (struct UsrData *UsrDat,bool CreatingMyOwnAccount)
|
||||||
Cal_FIRST_DAY_OF_WEEK_DEFAULT,
|
Cal_FIRST_DAY_OF_WEEK_DEFAULT,
|
||||||
(unsigned) Dat_FORMAT_DEFAULT,
|
(unsigned) Dat_FORMAT_DEFAULT,
|
||||||
Pri_VisibilityDB[UsrDat->PhotoVisibility],
|
Pri_VisibilityDB[UsrDat->PhotoVisibility],
|
||||||
Pri_VisibilityDB[UsrDat->ProfileVisibility],
|
Pri_VisibilityDB[UsrDat->BaPrfVisibility],
|
||||||
|
Pri_VisibilityDB[UsrDat->ExPrfVisibility],
|
||||||
UsrDat->CtyCod,
|
UsrDat->CtyCod,
|
||||||
UsrDat->LocalAddress ,UsrDat->LocalPhone,
|
UsrDat->LocalAddress ,UsrDat->LocalPhone,
|
||||||
UsrDat->FamilyAddress,UsrDat->FamilyPhone,UsrDat->OriginPlace,
|
UsrDat->FamilyAddress,UsrDat->FamilyPhone,UsrDat->OriginPlace,
|
||||||
|
|
|
@ -1557,7 +1557,8 @@ Profile:
|
||||||
1323. ActChgIco Change icon set
|
1323. ActChgIco Change icon set
|
||||||
1324. ActChgMnu Change menu
|
1324. ActChgMnu Change menu
|
||||||
1325. ActChgPriPho Change privacy of my photo
|
1325. ActChgPriPho Change privacy of my photo
|
||||||
1326. ActChgPriPrf Change privacy of my public profile
|
1326. ActChgBasPriPrf Change privacy of my basic public profile
|
||||||
|
NEW. ActChgExtPriPrf Change privacy of my extended public profile
|
||||||
NEW. ActChgCooPrf Change preference about third party cookies
|
NEW. ActChgCooPrf Change preference about third party cookies
|
||||||
1327. ActChgNtfPrf Change whether to notify by email new messages
|
1327. ActChgNtfPrf Change whether to notify by email new messages
|
||||||
1328. ActPrnUsrQR Show my QR code ready to print
|
1328. ActPrnUsrQR Show my QR code ready to print
|
||||||
|
@ -3143,7 +3144,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActChgIco */{1092,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Ico_ChangeIconSet ,Pre_EditPrefs ,NULL},
|
/* ActChgIco */{1092,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Ico_ChangeIconSet ,Pre_EditPrefs ,NULL},
|
||||||
/* ActChgMnu */{1243,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Mnu_ChangeMenu ,Pre_EditPrefs ,NULL},
|
/* ActChgMnu */{1243,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Mnu_ChangeMenu ,Pre_EditPrefs ,NULL},
|
||||||
/* ActChgPriPho */{ 774,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_ChangePhotoVisibility ,NULL},
|
/* ActChgPriPho */{ 774,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_ChangePhotoVisibility ,NULL},
|
||||||
/* ActChgPriPrf */{1404,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeProfileVisibility ,NULL},
|
/* ActChgBasPriPrf */{1404,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeBasicProfileVis ,NULL},
|
||||||
|
/* ActChgExtPriPrf */{1765,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeExtendedProfileVis ,NULL},
|
||||||
/* ActChgCooPrf */{1764,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Coo_ChangeMyPrefsCookies ,NULL},
|
/* ActChgCooPrf */{1764,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Coo_ChangeMyPrefsCookies ,NULL},
|
||||||
/* ActChgNtfPrf */{ 775,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Ntf_ChangeNotifyEvents ,Pre_EditPrefs ,NULL},
|
/* ActChgNtfPrf */{ 775,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Ntf_ChangeNotifyEvents ,Pre_EditPrefs ,NULL},
|
||||||
|
|
||||||
|
@ -4561,7 +4563,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
||||||
ActReqOthPubPrf, // #1401
|
ActReqOthPubPrf, // #1401
|
||||||
ActSeeOthPubPrf, // #1402
|
ActSeeOthPubPrf, // #1402
|
||||||
-1, // #1403 (obsolete action)
|
-1, // #1403 (obsolete action)
|
||||||
ActChgPriPrf, // #1404
|
ActChgBasPriPrf, // #1404
|
||||||
ActCalFig, // #1405
|
ActCalFig, // #1405
|
||||||
-1, // #1406 (obsolete action)
|
-1, // #1406 (obsolete action)
|
||||||
-1, // #1407 (obsolete action)
|
-1, // #1407 (obsolete action)
|
||||||
|
@ -4922,6 +4924,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
||||||
ActUnfSevStd, // #1762
|
ActUnfSevStd, // #1762
|
||||||
ActUnfSevTch, // #1763
|
ActUnfSevTch, // #1763
|
||||||
ActChgCooPrf, // #1764
|
ActChgCooPrf, // #1764
|
||||||
|
ActChgExtPriPrf, // #1765
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -5250,7 +5253,8 @@ void Act_AdjustCurrentAction (void)
|
||||||
the only action possible
|
the only action possible
|
||||||
is to show a form to change my preferences *****/
|
is to show a form to change my preferences *****/
|
||||||
if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN ||
|
if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN ||
|
||||||
Gbl.Usrs.Me.UsrDat.ProfileVisibility == Pri_VISIBILITY_UNKNOWN)
|
Gbl.Usrs.Me.UsrDat.BaPrfVisibility == Pri_VISIBILITY_UNKNOWN ||
|
||||||
|
Gbl.Usrs.Me.UsrDat.ExPrfVisibility == Pri_VISIBILITY_UNKNOWN)
|
||||||
{
|
{
|
||||||
Gbl.Action.Act = ActReqEdiPrf;
|
Gbl.Action.Act = ActReqEdiPrf;
|
||||||
Tab_SetCurrentTab ();
|
Tab_SetCurrentTab ();
|
||||||
|
|
|
@ -61,9 +61,9 @@ typedef enum
|
||||||
|
|
||||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||||
|
|
||||||
#define Act_NUM_ACTIONS (1 + 8 + 55 + 38 + 12 + 42 + 36 + 19 + 110 + 157 + 437 + 176 + 168 + 15 + 66)
|
#define Act_NUM_ACTIONS (1 + 8 + 55 + 38 + 12 + 42 + 36 + 19 + 110 + 157 + 437 + 176 + 168 + 15 + 67)
|
||||||
|
|
||||||
#define Act_MAX_ACTION_COD 1764
|
#define Act_MAX_ACTION_COD 1765
|
||||||
|
|
||||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||||
|
|
||||||
|
@ -1589,16 +1589,17 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
||||||
#define ActChgIco (ActSeeMyUsgRep + 56)
|
#define ActChgIco (ActSeeMyUsgRep + 56)
|
||||||
#define ActChgMnu (ActSeeMyUsgRep + 57)
|
#define ActChgMnu (ActSeeMyUsgRep + 57)
|
||||||
#define ActChgPriPho (ActSeeMyUsgRep + 58)
|
#define ActChgPriPho (ActSeeMyUsgRep + 58)
|
||||||
#define ActChgPriPrf (ActSeeMyUsgRep + 59)
|
#define ActChgBasPriPrf (ActSeeMyUsgRep + 59)
|
||||||
#define ActChgCooPrf (ActSeeMyUsgRep + 60)
|
#define ActChgExtPriPrf (ActSeeMyUsgRep + 60)
|
||||||
#define ActChgNtfPrf (ActSeeMyUsgRep + 61)
|
#define ActChgCooPrf (ActSeeMyUsgRep + 61)
|
||||||
|
#define ActChgNtfPrf (ActSeeMyUsgRep + 62)
|
||||||
|
|
||||||
#define ActPrnUsrQR (ActSeeMyUsgRep + 62)
|
#define ActPrnUsrQR (ActSeeMyUsgRep + 63)
|
||||||
|
|
||||||
#define ActPrnMyTT (ActSeeMyUsgRep + 63)
|
#define ActPrnMyTT (ActSeeMyUsgRep + 64)
|
||||||
#define ActEdiTut (ActSeeMyUsgRep + 64)
|
#define ActEdiTut (ActSeeMyUsgRep + 65)
|
||||||
#define ActChgTut (ActSeeMyUsgRep + 65)
|
#define ActChgTut (ActSeeMyUsgRep + 66)
|
||||||
#define ActChgMyTT1stDay (ActSeeMyUsgRep + 66)
|
#define ActChgMyTT1stDay (ActSeeMyUsgRep + 67)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************** Public types *******************************/
|
/******************************** Public types *******************************/
|
||||||
|
|
|
@ -667,7 +667,7 @@ static void Agd_PutIconsOtherPublicAgenda (void)
|
||||||
extern const char *Txt_View_record_and_office_hours;
|
extern const char *Txt_View_record_and_office_hours;
|
||||||
|
|
||||||
/***** Button to view user's public profile *****/
|
/***** Button to view user's public profile *****/
|
||||||
if (Pri_ShowingIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility,
|
if (Pri_ShowingIsAllowed (Gbl.Usrs.Other.UsrDat.BaPrfVisibility,
|
||||||
&Gbl.Usrs.Other.UsrDat))
|
&Gbl.Usrs.Other.UsrDat))
|
||||||
Lay_PutContextualLinkOnlyIcon (ActSeeOthPubPrf,NULL,
|
Lay_PutContextualLinkOnlyIcon (ActSeeOthPubPrf,NULL,
|
||||||
Usr_PutParamOtherUsrCodEncrypted,
|
Usr_PutParamOtherUsrCodEncrypted,
|
||||||
|
|
|
@ -459,10 +459,20 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.85.3 (2019-03-22)"
|
#define Log_PLATFORM_VERSION "SWAD 18.86 (2019-03-22)"
|
||||||
#define CSS_FILE "swad18.85.1.css"
|
#define CSS_FILE "swad18.85.1.css"
|
||||||
#define JS_FILE "swad18.85.js"
|
#define JS_FILE "swad18.85.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.86: Mar 22, 2019 Profile visibility is splitted into basic and extended.
|
||||||
|
Fixed bug storing media in database. (240928 lines)
|
||||||
|
6 changes necessary in database:
|
||||||
|
ALTER TABLE usr_data CHANGE COLUMN ProfileVisibility BaPrfVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown';
|
||||||
|
ALTER TABLE usr_data ADD COLUMN ExPrfVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown' AFTER BaPrfVisibility,ADD INDEX (ExPrfVisibility);
|
||||||
|
UPDATE usr_data SET ExPrfVisibility=BaPrfVisibility;
|
||||||
|
UPDATE usr_data SET BaPrfVisibility='system' WHERE BaPrfVisibility IN ('unknown','user','course');
|
||||||
|
UPDATE actions SET Txt='Cambiar priv. perfil público básico' WHERE ActCod='1404' AND Language='es';
|
||||||
|
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1765','es','N','Cambiar priv. perfil público extendido');
|
||||||
|
|
||||||
Version 18.85.3: Mar 22, 2019 Code refactoring related to third-party cookies. (240833 lines)
|
Version 18.85.3: Mar 22, 2019 Code refactoring related to third-party cookies. (240833 lines)
|
||||||
Version 18.85.2: Mar 22, 2019 Changed text related to third-party cookies. (240837 lines)
|
Version 18.85.2: Mar 22, 2019 Changed text related to third-party cookies. (240837 lines)
|
||||||
Version 18.85.1: Mar 21, 2019 Fixed bug in form to link YouTube videos.
|
Version 18.85.1: Mar 21, 2019 Fixed bug in form to link YouTube videos.
|
||||||
|
|
|
@ -2779,7 +2779,8 @@ mysql> DESCRIBE usr_data;
|
||||||
| DateFormat | tinyint(4) | NO | MUL | 0 | |
|
| DateFormat | tinyint(4) | NO | MUL | 0 | |
|
||||||
| Photo | char(43) | NO | | | |
|
| Photo | char(43) | NO | | | |
|
||||||
| PhotoVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
| PhotoVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
||||||
| ProfileVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
| BaPrfVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
||||||
|
| ExPrfVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
||||||
| CtyCod | int(11) | NO | MUL | -1 | |
|
| CtyCod | int(11) | NO | MUL | -1 | |
|
||||||
| InsCtyCod | int(11) | NO | MUL | -1 | |
|
| InsCtyCod | int(11) | NO | MUL | -1 | |
|
||||||
| InsCod | int(11) | NO | MUL | -1 | |
|
| InsCod | int(11) | NO | MUL | -1 | |
|
||||||
|
@ -2800,7 +2801,7 @@ mysql> DESCRIBE usr_data;
|
||||||
| NotifNtfEvents | int(11) | NO | | 0 | |
|
| NotifNtfEvents | int(11) | NO | | 0 | |
|
||||||
| EmailNtfEvents | int(11) | NO | | 0 | |
|
| EmailNtfEvents | int(11) | NO | | 0 | |
|
||||||
+-------------------+--------------------------------------------------+------+-----+---------+----------------+
|
+-------------------+--------------------------------------------------+------+-----+---------+----------------+
|
||||||
34 rows in set (0.00 sec)
|
35 rows in set (0.00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS usr_data ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS usr_data ("
|
||||||
"UsrCod INT NOT NULL AUTO_INCREMENT,"
|
"UsrCod INT NOT NULL AUTO_INCREMENT,"
|
||||||
|
@ -2817,7 +2818,8 @@ mysql> DESCRIBE usr_data;
|
||||||
"DateFormat TINYINT NOT NULL DEFAULT 0,"
|
"DateFormat TINYINT NOT NULL DEFAULT 0,"
|
||||||
"Photo CHAR(43) NOT NULL DEFAULT ''," // Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64
|
"Photo CHAR(43) NOT NULL DEFAULT ''," // Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64
|
||||||
"PhotoVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',"
|
"PhotoVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',"
|
||||||
"ProfileVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',"
|
"BaPrfVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',"
|
||||||
|
"ExPrfVisibility ENUM('unknown','user','course','system','world') NOT NULL DEFAULT 'unknown',"
|
||||||
"CtyCod INT NOT NULL DEFAULT -1,"
|
"CtyCod INT NOT NULL DEFAULT -1,"
|
||||||
"InsCtyCod INT NOT NULL DEFAULT -1,"
|
"InsCtyCod INT NOT NULL DEFAULT -1,"
|
||||||
"InsCod INT NOT NULL DEFAULT -1,"
|
"InsCod INT NOT NULL DEFAULT -1,"
|
||||||
|
@ -2845,7 +2847,8 @@ mysql> DESCRIBE usr_data;
|
||||||
"INDEX(FirstDayOfWeek),"
|
"INDEX(FirstDayOfWeek),"
|
||||||
"INDEX(DateFormat),"
|
"INDEX(DateFormat),"
|
||||||
"INDEX(PhotoVisibility),"
|
"INDEX(PhotoVisibility),"
|
||||||
"INDEX(ProfileVisibility),"
|
"INDEX(BaPrfVisibility),"
|
||||||
|
"INDEX(ExPrfVisibility),"
|
||||||
"INDEX(CtyCod),"
|
"INDEX(CtyCod),"
|
||||||
"INDEX(InsCtyCod),"
|
"INDEX(InsCtyCod),"
|
||||||
"INDEX(InsCod),"
|
"INDEX(InsCod),"
|
||||||
|
|
|
@ -168,7 +168,8 @@ static void Fig_GetAndShowMsgsStats (void);
|
||||||
|
|
||||||
static void Fig_GetAndShowSurveysStats (void);
|
static void Fig_GetAndShowSurveysStats (void);
|
||||||
static void Fig_GetAndShowNumUsrsPerPrivacy (void);
|
static void Fig_GetAndShowNumUsrsPerPrivacy (void);
|
||||||
static void Fig_GetAndShowNumUsrsPerPrivacyForAnObject (const char *TxtObject,const char *FieldName);
|
static void Fig_GetAndShowNumUsrsPerPrivacyForAnObject (const char *TxtObject,
|
||||||
|
const char *FieldName);
|
||||||
static void Fig_GetAndShowNumUsrsPerCookies (void);
|
static void Fig_GetAndShowNumUsrsPerCookies (void);
|
||||||
static void Fig_GetAndShowNumUsrsPerLanguage (void);
|
static void Fig_GetAndShowNumUsrsPerLanguage (void);
|
||||||
static void Fig_GetAndShowNumUsrsPerFirstDayOfWeek (void);
|
static void Fig_GetAndShowNumUsrsPerFirstDayOfWeek (void);
|
||||||
|
@ -179,7 +180,6 @@ static void Fig_GetAndShowNumUsrsPerTheme (void);
|
||||||
static void Fig_GetAndShowNumUsrsPerSideColumns (void);
|
static void Fig_GetAndShowNumUsrsPerSideColumns (void);
|
||||||
unsigned Fig_GetNumUsrsWhoChoseAnOption (const char *SubQuery);
|
unsigned Fig_GetNumUsrsWhoChoseAnOption (const char *SubQuery);
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************** Show use of the platform *************************/
|
/************************** Show use of the platform *************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -4807,7 +4807,8 @@ static void Fig_GetAndShowNumUsrsPerPrivacy (void)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ANALYTICS_Figures_privacy;
|
extern const char *Hlp_ANALYTICS_Figures_privacy;
|
||||||
extern const char *Txt_Photo;
|
extern const char *Txt_Photo;
|
||||||
extern const char *Txt_Public_profile;
|
extern const char *Txt_Basic_public_profile;
|
||||||
|
extern const char *Txt_Extended_public_profile;
|
||||||
extern const char *Txt_FIGURE_TYPES[Fig_NUM_FIGURES];
|
extern const char *Txt_FIGURE_TYPES[Fig_NUM_FIGURES];
|
||||||
|
|
||||||
/***** Start box and table *****/
|
/***** Start box and table *****/
|
||||||
|
@ -4815,10 +4816,14 @@ static void Fig_GetAndShowNumUsrsPerPrivacy (void)
|
||||||
Hlp_ANALYTICS_Figures_privacy,Box_NOT_CLOSABLE,2);
|
Hlp_ANALYTICS_Figures_privacy,Box_NOT_CLOSABLE,2);
|
||||||
|
|
||||||
/***** Privacy for photo *****/
|
/***** Privacy for photo *****/
|
||||||
Fig_GetAndShowNumUsrsPerPrivacyForAnObject (Txt_Photo,"PhotoVisibility");
|
Fig_GetAndShowNumUsrsPerPrivacyForAnObject (Txt_Photo,
|
||||||
|
"PhotoVisibility");
|
||||||
|
|
||||||
/***** Privacy for public profile *****/
|
/***** Privacy for public profile *****/
|
||||||
Fig_GetAndShowNumUsrsPerPrivacyForAnObject (Txt_Public_profile,"ProfileVisibility");
|
Fig_GetAndShowNumUsrsPerPrivacyForAnObject (Txt_Basic_public_profile,
|
||||||
|
"BaPrfVisibility");
|
||||||
|
Fig_GetAndShowNumUsrsPerPrivacyForAnObject (Txt_Extended_public_profile,
|
||||||
|
"ExPrfVisibility");
|
||||||
|
|
||||||
/***** End table and box *****/
|
/***** End table and box *****/
|
||||||
Box_EndBoxTable ();
|
Box_EndBoxTable ();
|
||||||
|
@ -4828,7 +4833,8 @@ static void Fig_GetAndShowNumUsrsPerPrivacy (void)
|
||||||
/********** Get and show number of users who have chosen a privacy ***********/
|
/********** Get and show number of users who have chosen a privacy ***********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Fig_GetAndShowNumUsrsPerPrivacyForAnObject (const char *TxtObject,const char *FieldName)
|
static void Fig_GetAndShowNumUsrsPerPrivacyForAnObject (const char *TxtObject,
|
||||||
|
const char *FieldName)
|
||||||
{
|
{
|
||||||
extern const char *Txt_No_of_users;
|
extern const char *Txt_No_of_users;
|
||||||
extern const char *Txt_PERCENT_of_users;
|
extern const char *Txt_PERCENT_of_users;
|
||||||
|
|
|
@ -318,7 +318,7 @@ static unsigned long Fol_GetUsrsWhoToFollow (unsigned long MaxUsrsToShow,
|
||||||
" WHERE usr_follow.FollowerCod=my_followed.FollowedCod"
|
" WHERE usr_follow.FollowerCod=my_followed.FollowedCod"
|
||||||
" AND usr_follow.FollowedCod<>%ld"
|
" AND usr_follow.FollowedCod<>%ld"
|
||||||
" AND usr_follow.FollowedCod=usr_data.UsrCod"
|
" AND usr_follow.FollowedCod=usr_data.UsrCod"
|
||||||
" AND usr_data.ProfileVisibility IN ('%s','%s')"
|
" AND usr_data.BaPrfVisibility IN ('%s','%s')"
|
||||||
" AND usr_data.Surname1<>''" // Surname 1 not empty
|
" AND usr_data.Surname1<>''" // Surname 1 not empty
|
||||||
" AND usr_data.FirstName<>''" // First name not empty
|
" AND usr_data.FirstName<>''" // First name not empty
|
||||||
"%s" // SubQuery1
|
"%s" // SubQuery1
|
||||||
|
@ -336,7 +336,7 @@ static unsigned long Fol_GetUsrsWhoToFollow (unsigned long MaxUsrsToShow,
|
||||||
" WHERE crs_usr.CrsCod=my_crs.CrsCod"
|
" WHERE crs_usr.CrsCod=my_crs.CrsCod"
|
||||||
" AND crs_usr.UsrCod<>%ld"
|
" AND crs_usr.UsrCod<>%ld"
|
||||||
" AND crs_usr.UsrCod=usr_data.UsrCod"
|
" AND crs_usr.UsrCod=usr_data.UsrCod"
|
||||||
" AND usr_data.ProfileVisibility IN ('%s','%s','%s')"
|
" AND usr_data.BaPrfVisibility IN ('%s','%s','%s')"
|
||||||
" AND usr_data.Surname1<>''" // Surname 1 not empty
|
" AND usr_data.Surname1<>''" // Surname 1 not empty
|
||||||
" AND usr_data.FirstName<>''" // First name not empty
|
" AND usr_data.FirstName<>''" // First name not empty
|
||||||
"%s" // SubQuery2
|
"%s" // SubQuery2
|
||||||
|
@ -353,7 +353,7 @@ static unsigned long Fol_GetUsrsWhoToFollow (unsigned long MaxUsrsToShow,
|
||||||
" WHERE crs_usr.CrsCod=my_crs_role.CrsCod"
|
" WHERE crs_usr.CrsCod=my_crs_role.CrsCod"
|
||||||
" AND crs_usr.Role<>my_crs_role.Role"
|
" AND crs_usr.Role<>my_crs_role.Role"
|
||||||
" AND crs_usr.UsrCod=usr_data.UsrCod"
|
" AND crs_usr.UsrCod=usr_data.UsrCod"
|
||||||
" AND usr_data.ProfileVisibility='%s'"
|
" AND usr_data.BaPrfVisibility='%s'"
|
||||||
" AND usr_data.Surname1<>''" // Surname 1 not empty
|
" AND usr_data.Surname1<>''" // Surname 1 not empty
|
||||||
" AND usr_data.FirstName<>''" // First name not empty
|
" AND usr_data.FirstName<>''" // First name not empty
|
||||||
"%s" // SubQuery3
|
"%s" // SubQuery3
|
||||||
|
@ -373,7 +373,7 @@ static unsigned long Fol_GetUsrsWhoToFollow (unsigned long MaxUsrsToShow,
|
||||||
// Pri_VISIBILITY_SYSTEM or Pri_VISIBILITY_WORLD
|
// Pri_VISIBILITY_SYSTEM or Pri_VISIBILITY_WORLD
|
||||||
"SELECT UsrCod FROM usr_data"
|
"SELECT UsrCod FROM usr_data"
|
||||||
" WHERE UsrCod<>%ld"
|
" WHERE UsrCod<>%ld"
|
||||||
" AND ProfileVisibility IN ('%s','%s')"
|
" AND BaPrfVisibility IN ('%s','%s')"
|
||||||
" AND Surname1<>''" // Surname 1 not empty
|
" AND Surname1<>''" // Surname 1 not empty
|
||||||
" AND FirstName<>''" // First name not empty
|
" AND FirstName<>''" // First name not empty
|
||||||
"%s" // SubQuery4
|
"%s" // SubQuery4
|
||||||
|
@ -842,7 +842,7 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
|
||||||
extern const char *Txt_Another_user_s_profile;
|
extern const char *Txt_Another_user_s_profile;
|
||||||
bool ShowPhoto;
|
bool ShowPhoto;
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
bool Visible = Pri_ShowingIsAllowed (UsrDat->ProfileVisibility,UsrDat);
|
bool Visible = Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat);
|
||||||
bool ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
bool ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
||||||
|
|
||||||
/***** Show user's photo *****/
|
/***** Show user's photo *****/
|
||||||
|
@ -898,7 +898,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
|
||||||
extern const char *Txt_Another_user_s_profile;
|
extern const char *Txt_Another_user_s_profile;
|
||||||
bool ShowPhoto;
|
bool ShowPhoto;
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
bool Visible = Pri_ShowingIsAllowed (UsrDat->ProfileVisibility,UsrDat);
|
bool Visible = Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat);
|
||||||
bool ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
bool ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
||||||
|
|
||||||
/***** Show user's photo *****/
|
/***** Show user's photo *****/
|
||||||
|
|
|
@ -1145,7 +1145,7 @@ static void Med_GetAndProcessYouTubeFromForm (const char *ParamURL,
|
||||||
Media->Name[CodeLength] = '\0';
|
Media->Name[CodeLength] = '\0';
|
||||||
|
|
||||||
/* Set media type and status */
|
/* Set media type and status */
|
||||||
Media->Type = Med_EMBED;
|
Media->Type = Med_YOUTUBE;
|
||||||
Media->Status = Med_PROCESSED;
|
Media->Status = Med_PROCESSED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -82,7 +82,8 @@ void Pri_EditMyPrivacy (void)
|
||||||
extern const char *Txt_Please_review_your_privacy_preferences;
|
extern const char *Txt_Please_review_your_privacy_preferences;
|
||||||
extern const char *Txt_Privacy;
|
extern const char *Txt_Privacy;
|
||||||
extern const char *Txt_Photo;
|
extern const char *Txt_Photo;
|
||||||
extern const char *Txt_Public_profile;
|
extern const char *Txt_Basic_public_profile;
|
||||||
|
extern const char *Txt_Extended_public_profile;
|
||||||
extern const char *Txt_Timeline;
|
extern const char *Txt_Timeline;
|
||||||
|
|
||||||
/***** Start section with preferences on privacy *****/
|
/***** Start section with preferences on privacy *****/
|
||||||
|
@ -90,7 +91,8 @@ void Pri_EditMyPrivacy (void)
|
||||||
|
|
||||||
/***** If any of my preferences about privacy is unknown *****/
|
/***** If any of my preferences about privacy is unknown *****/
|
||||||
if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN ||
|
if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN ||
|
||||||
Gbl.Usrs.Me.UsrDat.ProfileVisibility == Pri_VISIBILITY_UNKNOWN)
|
Gbl.Usrs.Me.UsrDat.BaPrfVisibility == Pri_VISIBILITY_UNKNOWN ||
|
||||||
|
Gbl.Usrs.Me.UsrDat.ExPrfVisibility == Pri_VISIBILITY_UNKNOWN)
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_review_your_privacy_preferences);
|
Ale_ShowAlert (Ale_WARNING,Txt_Please_review_your_privacy_preferences);
|
||||||
|
|
||||||
/***** Start box and table *****/
|
/***** Start box and table *****/
|
||||||
|
@ -101,25 +103,25 @@ void Pri_EditMyPrivacy (void)
|
||||||
Pri_PutFormVisibility (Txt_Photo,
|
Pri_PutFormVisibility (Txt_Photo,
|
||||||
ActChgPriPho,"VisPho",
|
ActChgPriPho,"VisPho",
|
||||||
Gbl.Usrs.Me.UsrDat.PhotoVisibility,
|
Gbl.Usrs.Me.UsrDat.PhotoVisibility,
|
||||||
(1 << Pri_VISIBILITY_USER) |
|
Pri_PHOTO_ALLOWED_VIS);
|
||||||
(1 << Pri_VISIBILITY_COURSE) |
|
|
||||||
(1 << Pri_VISIBILITY_SYSTEM) |
|
|
||||||
(1 << Pri_VISIBILITY_WORLD));
|
|
||||||
|
|
||||||
/***** Edit public profile visibility *****/
|
/***** Edit basic public profile visibility *****/
|
||||||
Pri_PutFormVisibility (Txt_Public_profile,
|
Pri_PutFormVisibility (Txt_Basic_public_profile,
|
||||||
ActChgPriPrf,"VisPrf",
|
ActChgBasPriPrf,"VisBasPrf",
|
||||||
Gbl.Usrs.Me.UsrDat.ProfileVisibility,
|
Gbl.Usrs.Me.UsrDat.BaPrfVisibility,
|
||||||
(1 << Pri_VISIBILITY_USER) |
|
Pri_BASIC_PROFILE_ALLOWED_VIS);
|
||||||
(1 << Pri_VISIBILITY_COURSE) |
|
|
||||||
(1 << Pri_VISIBILITY_SYSTEM) |
|
/***** Edit extended public profile visibility *****/
|
||||||
(1 << Pri_VISIBILITY_WORLD));
|
Pri_PutFormVisibility (Txt_Extended_public_profile,
|
||||||
|
ActChgExtPriPrf,"VisExtPrf",
|
||||||
|
Gbl.Usrs.Me.UsrDat.ExPrfVisibility,
|
||||||
|
Pri_EXTENDED_PROFILE_ALLOWED_VIS);
|
||||||
|
|
||||||
/***** Edit public activity (timeline) visibility *****/
|
/***** Edit public activity (timeline) visibility *****/
|
||||||
Pri_PutFormVisibility (Txt_Timeline,
|
Pri_PutFormVisibility (Txt_Timeline,
|
||||||
ActUnk,"VisTml",
|
ActUnk,"VisTml",
|
||||||
Pri_VISIBILITY_SYSTEM,
|
Pri_VISIBILITY_SYSTEM,
|
||||||
(1 << Pri_VISIBILITY_SYSTEM));
|
Pri_TIMELINE_ALLOWED_VIS);
|
||||||
|
|
||||||
/***** End table and box *****/
|
/***** End table and box *****/
|
||||||
Box_EndBoxTable ();
|
Box_EndBoxTable ();
|
||||||
|
@ -163,11 +165,11 @@ static void Pri_PutFormVisibility (const char *TxtLabel,
|
||||||
/***** Form with list of options *****/
|
/***** Form with list of options *****/
|
||||||
if (Action != ActUnk)
|
if (Action != ActUnk)
|
||||||
Frm_StartFormAnchor (Action,Pri_PRIVACY_ID);
|
Frm_StartFormAnchor (Action,Pri_PRIVACY_ID);
|
||||||
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">");
|
fprintf (Gbl.F.Out,"<ul class=\"PRI_LIST LIST_LEFT\">");
|
||||||
for (Visibility = Pri_VISIBILITY_USER;
|
for (Visibility = Pri_VISIBILITY_USER;
|
||||||
Visibility <= Pri_VISIBILITY_WORLD;
|
Visibility <= Pri_VISIBILITY_WORLD;
|
||||||
Visibility++)
|
Visibility++)
|
||||||
if (MaskAllowedVisibility & 1 << Visibility)
|
if (MaskAllowedVisibility & (1 << Visibility))
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<li class=\"%s\">"
|
fprintf (Gbl.F.Out,"<li class=\"%s\">"
|
||||||
"<label>"
|
"<label>"
|
||||||
|
@ -180,7 +182,7 @@ static void Pri_PutFormVisibility (const char *TxtLabel,
|
||||||
if (Action == ActUnk)
|
if (Action == ActUnk)
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||||
else
|
else
|
||||||
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\"",
|
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
fprintf (Gbl.F.Out," />"
|
fprintf (Gbl.F.Out," />"
|
||||||
"%s"
|
"%s"
|
||||||
|
|
|
@ -35,8 +35,25 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/***** Visibility (who can see user's photo / public profile) *****/
|
/***** Visibility (who can see user's photo / public profile) *****/
|
||||||
#define Pri_PHOTO_VISIBILITY_DEFAULT Pri_VISIBILITY_SYSTEM
|
/* Allowed visibility for photo */
|
||||||
#define Pri_PROFILE_VISIBILITY_DEFAULT Pri_VISIBILITY_SYSTEM
|
#define Pri_PHOTO_ALLOWED_VIS (1 << Pri_VISIBILITY_USER) | \
|
||||||
|
(1 << Pri_VISIBILITY_COURSE) | \
|
||||||
|
(1 << Pri_VISIBILITY_SYSTEM) | \
|
||||||
|
(1 << Pri_VISIBILITY_WORLD)
|
||||||
|
/* Allowed visibility for basic profile */
|
||||||
|
#define Pri_BASIC_PROFILE_ALLOWED_VIS (1 << Pri_VISIBILITY_SYSTEM) | \
|
||||||
|
(1 << Pri_VISIBILITY_WORLD)
|
||||||
|
/* Allowed visibility for extended profile */
|
||||||
|
#define Pri_EXTENDED_PROFILE_ALLOWED_VIS (1 << Pri_VISIBILITY_USER) | \
|
||||||
|
(1 << Pri_VISIBILITY_COURSE) | \
|
||||||
|
(1 << Pri_VISIBILITY_SYSTEM) | \
|
||||||
|
(1 << Pri_VISIBILITY_WORLD)
|
||||||
|
/* Allowed visibility for timeline */
|
||||||
|
#define Pri_TIMELINE_ALLOWED_VIS (1 << Pri_VISIBILITY_SYSTEM)
|
||||||
|
|
||||||
|
#define Pri_PHOTO_VIS_DEFAULT Pri_VISIBILITY_SYSTEM
|
||||||
|
#define Pri_BASIC_PROFILE_VIS_DEFAULT Pri_VISIBILITY_SYSTEM
|
||||||
|
#define Pri_EXTENDED_PROFILE_VIS_DEFAULT Pri_VISIBILITY_SYSTEM
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
|
|
|
@ -282,7 +282,7 @@ bool Prf_ShowUserProfile (struct UsrData *UsrDat)
|
||||||
bool ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
bool ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
||||||
|
|
||||||
/***** Check if I can see the public profile *****/
|
/***** Check if I can see the public profile *****/
|
||||||
if (Pri_ShowingIsAllowed (UsrDat->ProfileVisibility,UsrDat))
|
if (Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat))
|
||||||
{
|
{
|
||||||
/***** Contextual links *****/
|
/***** Contextual links *****/
|
||||||
if (Gbl.Usrs.Me.Logged)
|
if (Gbl.Usrs.Me.Logged)
|
||||||
|
@ -316,6 +316,9 @@ bool Prf_ShowUserProfile (struct UsrData *UsrDat)
|
||||||
}
|
}
|
||||||
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_PUBLIC,UsrDat,NULL);
|
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_PUBLIC,UsrDat,NULL);
|
||||||
|
|
||||||
|
/***** Extended profile *****/
|
||||||
|
if (Pri_ShowingIsAllowed (UsrDat->ExPrfVisibility,UsrDat))
|
||||||
|
{
|
||||||
/***** Show details of user's profile *****/
|
/***** Show details of user's profile *****/
|
||||||
Prf_ShowDetailsUserProfile (UsrDat);
|
Prf_ShowDetailsUserProfile (UsrDat);
|
||||||
|
|
||||||
|
@ -334,6 +337,7 @@ bool Prf_ShowUserProfile (struct UsrData *UsrDat)
|
||||||
Fol_ShowFollowingAndFollowers (UsrDat,
|
Fol_ShowFollowingAndFollowers (UsrDat,
|
||||||
NumFollowing,NumFollowers,
|
NumFollowing,NumFollowers,
|
||||||
UsrFollowsMe,IFollowUsr);
|
UsrFollowsMe,IFollowUsr);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -344,19 +348,38 @@ bool Prf_ShowUserProfile (struct UsrData *UsrDat)
|
||||||
/******************** Change my public profile visibility ********************/
|
/******************** Change my public profile visibility ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Prf_ChangeProfileVisibility (void)
|
void Prf_ChangeBasicProfileVis (void)
|
||||||
{
|
{
|
||||||
extern const char *Pri_VisibilityDB[Pri_NUM_OPTIONS_PRIVACY];
|
extern const char *Pri_VisibilityDB[Pri_NUM_OPTIONS_PRIVACY];
|
||||||
|
|
||||||
/***** Get param with public/private photo *****/
|
/***** Get param with public/private photo *****/
|
||||||
Gbl.Usrs.Me.UsrDat.ProfileVisibility = Pri_GetParamVisibility ("VisPrf");
|
Gbl.Usrs.Me.UsrDat.BaPrfVisibility = Pri_GetParamVisibility ("VisBasPrf");
|
||||||
|
|
||||||
/***** Store public/private photo in database *****/
|
/***** Store public/private photo in database *****/
|
||||||
DB_QueryUPDATE ("can not update your preference"
|
DB_QueryUPDATE ("can not update your preference"
|
||||||
" about public profile visibility",
|
" about public profile visibility",
|
||||||
"UPDATE usr_data SET ProfileVisibility='%s'"
|
"UPDATE usr_data SET BaPrfVisibility='%s'"
|
||||||
" WHERE UsrCod=%ld",
|
" WHERE UsrCod=%ld",
|
||||||
Pri_VisibilityDB[Gbl.Usrs.Me.UsrDat.ProfileVisibility],
|
Pri_VisibilityDB[Gbl.Usrs.Me.UsrDat.BaPrfVisibility],
|
||||||
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
|
||||||
|
/***** Show form again *****/
|
||||||
|
Pre_EditPrefs ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Prf_ChangeExtendedProfileVis (void)
|
||||||
|
{
|
||||||
|
extern const char *Pri_VisibilityDB[Pri_NUM_OPTIONS_PRIVACY];
|
||||||
|
|
||||||
|
/***** Get param with public/private photo *****/
|
||||||
|
Gbl.Usrs.Me.UsrDat.ExPrfVisibility = Pri_GetParamVisibility ("VisExtPrf");
|
||||||
|
|
||||||
|
/***** Store public/private photo in database *****/
|
||||||
|
DB_QueryUPDATE ("can not update your preference"
|
||||||
|
" about public profile visibility",
|
||||||
|
"UPDATE usr_data SET ExPrfVisibility='%s'"
|
||||||
|
" WHERE UsrCod=%ld",
|
||||||
|
Pri_VisibilityDB[Gbl.Usrs.Me.UsrDat.ExPrfVisibility],
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
|
||||||
/***** Show form again *****/
|
/***** Show form again *****/
|
||||||
|
@ -1732,7 +1755,7 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank)
|
||||||
extern const char *Txt_Another_user_s_profile;
|
extern const char *Txt_Another_user_s_profile;
|
||||||
bool ShowPhoto;
|
bool ShowPhoto;
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
bool Visible = Pri_ShowingIsAllowed (UsrDat->ProfileVisibility,UsrDat);
|
bool Visible = Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RANK RIGHT_MIDDLE COLOR%u\""
|
fprintf (Gbl.F.Out,"<td class=\"RANK RIGHT_MIDDLE COLOR%u\""
|
||||||
" style=\"height:50px;\">"
|
" style=\"height:50px;\">"
|
||||||
|
|
|
@ -60,7 +60,8 @@ void Prf_RequestUserProfile (void);
|
||||||
void Prf_GetUsrDatAndShowUserProfile (void);
|
void Prf_GetUsrDatAndShowUserProfile (void);
|
||||||
|
|
||||||
bool Prf_ShowUserProfile (struct UsrData *UsrDat);
|
bool Prf_ShowUserProfile (struct UsrData *UsrDat);
|
||||||
void Prf_ChangeProfileVisibility (void);
|
void Prf_ChangeBasicProfileVis (void);
|
||||||
|
void Prf_ChangeExtendedProfileVis (void);
|
||||||
|
|
||||||
void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat);
|
void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat);
|
||||||
void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
|
void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
|
||||||
|
|
|
@ -2474,7 +2474,7 @@ static void Rec_PutIconsCommands (void)
|
||||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB && // Only in main browser tab
|
Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB && // Only in main browser tab
|
||||||
Gbl.Usrs.Me.Logged) // Only if I am logged
|
Gbl.Usrs.Me.Logged) // Only if I am logged
|
||||||
{
|
{
|
||||||
ICanViewUsrProfile = Pri_ShowingIsAllowed (Gbl.Record.UsrDat->ProfileVisibility,
|
ICanViewUsrProfile = Pri_ShowingIsAllowed (Gbl.Record.UsrDat->BaPrfVisibility,
|
||||||
Gbl.Record.UsrDat);
|
Gbl.Record.UsrDat);
|
||||||
|
|
||||||
/***** Start container *****/
|
/***** Start container *****/
|
||||||
|
|
63
swad_text.c
63
swad_text.c
|
@ -2789,6 +2789,27 @@ const char *Txt_Banners =
|
||||||
"Banners";
|
"Banners";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Basic_public_profile =
|
||||||
|
#if L==1 // ca
|
||||||
|
"Perfil públic bàsic";
|
||||||
|
#elif L==2 // de
|
||||||
|
"Grundlegendes öffentliches Profile";
|
||||||
|
#elif L==3 // en
|
||||||
|
"Basic public profile";
|
||||||
|
#elif L==4 // es
|
||||||
|
"Perfil público básico";
|
||||||
|
#elif L==5 // fr
|
||||||
|
"Profil public de base";
|
||||||
|
#elif L==6 // gn
|
||||||
|
"Perfil público básico"; // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"Profilo pubblico di base";
|
||||||
|
#elif L==8 // pl
|
||||||
|
"Podstawowy profil publiczny";
|
||||||
|
#elif L==9 // pt
|
||||||
|
"Perfil público básico";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered =
|
const char *Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Abans de crear un compte nou,"
|
"Abans de crear un compte nou,"
|
||||||
|
@ -11321,6 +11342,27 @@ const char *Txt_Export_questions =
|
||||||
"Exportar perguntas";
|
"Exportar perguntas";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Extended_public_profile =
|
||||||
|
#if L==1 // ca
|
||||||
|
"Perfil públic ampliat";
|
||||||
|
#elif L==2 // de
|
||||||
|
"Erweitertes öffentliches Profile";
|
||||||
|
#elif L==3 // en
|
||||||
|
"Extended public profile";
|
||||||
|
#elif L==4 // es
|
||||||
|
"Perfil público extendido";
|
||||||
|
#elif L==5 // fr
|
||||||
|
"Profil public étendu";
|
||||||
|
#elif L==6 // gn
|
||||||
|
"Perfil público extendido"; // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"Profilo pubblico esteso";
|
||||||
|
#elif L==8 // pl
|
||||||
|
"Rozszerzony profil publiczny";
|
||||||
|
#elif L==9 // pt
|
||||||
|
"Perfil público estendido";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_X_faces_have_been_detected_in_front_position_1_Z_ = // Warning: it is very important to include two %u in the following sentences
|
const char *Txt_X_faces_have_been_detected_in_front_position_1_Z_ = // Warning: it is very important to include two %u in the following sentences
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Se han detectado %u rostros en posición frontal:<br />"
|
"Se han detectado %u rostros en posición frontal:<br />"
|
||||||
|
@ -30591,27 +30633,6 @@ const char *Txt_Public_open_educational_resource_OER_for_everyone =
|
||||||
"Público, recurso educacional aberto (OER) para todos";
|
"Público, recurso educacional aberto (OER) para todos";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Public_profile =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Perfil públic";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Öffentliches Benutzer-Profile";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Public profile";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Perfil público";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Profil public";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Perfil público"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Profilo pubblico";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Profil publiczny";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Perfil público";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Public_views =
|
const char *Txt_Public_views =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Accessos públics";
|
"Accessos públics";
|
||||||
|
|
184
swad_user.c
184
swad_user.c
|
@ -323,8 +323,9 @@ void Usr_ResetUsrDataExceptUsrCodAndIDs (struct UsrData *UsrDat)
|
||||||
UsrDat->EmailConfirmed = false;
|
UsrDat->EmailConfirmed = false;
|
||||||
|
|
||||||
UsrDat->Photo[0] = '\0';
|
UsrDat->Photo[0] = '\0';
|
||||||
UsrDat->PhotoVisibility = Pri_PHOTO_VISIBILITY_DEFAULT;
|
UsrDat->PhotoVisibility = Pri_PHOTO_VIS_DEFAULT;
|
||||||
UsrDat->ProfileVisibility = Pri_PROFILE_VISIBILITY_DEFAULT;
|
UsrDat->BaPrfVisibility = Pri_BASIC_PROFILE_VIS_DEFAULT;
|
||||||
|
UsrDat->ExPrfVisibility = Pri_EXTENDED_PROFILE_VIS_DEFAULT;
|
||||||
|
|
||||||
UsrDat->CtyCod = -1L;
|
UsrDat->CtyCod = -1L;
|
||||||
UsrDat->OriginPlace[0] = '\0';
|
UsrDat->OriginPlace[0] = '\0';
|
||||||
|
@ -494,24 +495,25 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,Usr_GetPrefs_t GetPrefs)
|
||||||
"Sex," // row[ 5]
|
"Sex," // row[ 5]
|
||||||
"Photo," // row[ 6]
|
"Photo," // row[ 6]
|
||||||
"PhotoVisibility," // row[ 7]
|
"PhotoVisibility," // row[ 7]
|
||||||
"ProfileVisibility," // row[ 8]
|
"BaPrfVisibility," // row[ 8]
|
||||||
"CtyCod," // row[ 9]
|
"ExPrfVisibility," // row[ 9]
|
||||||
"InsCtyCod," // row[10]
|
"CtyCod," // row[10]
|
||||||
"InsCod," // row[11]
|
"InsCtyCod," // row[11]
|
||||||
"DptCod," // row[12]
|
"InsCod," // row[12]
|
||||||
"CtrCod," // row[13]
|
"DptCod," // row[13]
|
||||||
"Office," // row[14]
|
"CtrCod," // row[14]
|
||||||
"OfficePhone," // row[15]
|
"Office," // row[15]
|
||||||
"LocalAddress," // row[16]
|
"OfficePhone," // row[16]
|
||||||
"LocalPhone," // row[17]
|
"LocalAddress," // row[17]
|
||||||
"FamilyAddress," // row[18]
|
"LocalPhone," // row[18]
|
||||||
"FamilyPhone," // row[19]
|
"FamilyAddress," // row[19]
|
||||||
"OriginPlace," // row[20]
|
"FamilyPhone," // row[20]
|
||||||
|
"OriginPlace," // row[21]
|
||||||
"DATE_FORMAT(Birthday,"
|
"DATE_FORMAT(Birthday,"
|
||||||
"'%%Y%%m%%d')," // row[21]
|
"'%%Y%%m%%d')," // row[22]
|
||||||
"Comments," // row[22]
|
"Comments," // row[23]
|
||||||
"NotifNtfEvents," // row[23]
|
"NotifNtfEvents," // row[24]
|
||||||
"EmailNtfEvents" // row[24]
|
"EmailNtfEvents" // row[25]
|
||||||
" FROM usr_data"
|
" FROM usr_data"
|
||||||
" WHERE UsrCod=%ld",
|
" WHERE UsrCod=%ld",
|
||||||
UsrDat->UsrCod);
|
UsrDat->UsrCod);
|
||||||
|
@ -527,35 +529,36 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,Usr_GetPrefs_t GetPrefs)
|
||||||
"Sex," // row[ 5]
|
"Sex," // row[ 5]
|
||||||
"Photo," // row[ 6]
|
"Photo," // row[ 6]
|
||||||
"PhotoVisibility," // row[ 7]
|
"PhotoVisibility," // row[ 7]
|
||||||
"ProfileVisibility," // row[ 8]
|
"BaPrfVisibility," // row[ 8]
|
||||||
"CtyCod," // row[ 9]
|
"ExPrfVisibility," // row[ 9]
|
||||||
"InsCtyCod," // row[10]
|
"CtyCod," // row[10]
|
||||||
"InsCod," // row[11]
|
"InsCtyCod," // row[11]
|
||||||
"DptCod," // row[12]
|
"InsCod," // row[12]
|
||||||
"CtrCod," // row[13]
|
"DptCod," // row[13]
|
||||||
"Office," // row[14]
|
"CtrCod," // row[14]
|
||||||
"OfficePhone," // row[15]
|
"Office," // row[15]
|
||||||
"LocalAddress," // row[16]
|
"OfficePhone," // row[16]
|
||||||
"LocalPhone," // row[17]
|
"LocalAddress," // row[17]
|
||||||
"FamilyAddress," // row[18]
|
"LocalPhone," // row[18]
|
||||||
"FamilyPhone," // row[19]
|
"FamilyAddress," // row[19]
|
||||||
"OriginPlace," // row[20]
|
"FamilyPhone," // row[20]
|
||||||
|
"OriginPlace," // row[21]
|
||||||
"DATE_FORMAT(Birthday,"
|
"DATE_FORMAT(Birthday,"
|
||||||
"'%%Y%%m%%d')," // row[21]
|
"'%%Y%%m%%d')," // row[22]
|
||||||
"Comments," // row[22]
|
"Comments," // row[23]
|
||||||
"NotifNtfEvents," // row[23]
|
"NotifNtfEvents," // row[24]
|
||||||
"EmailNtfEvents," // row[24]
|
"EmailNtfEvents," // row[25]
|
||||||
|
|
||||||
// Preferences (usually not necessary
|
// Preferences (usually not necessary
|
||||||
// when getting another user's data)
|
// when getting another user's data)
|
||||||
"Language," // row[25]
|
"Language," // row[26]
|
||||||
"FirstDayOfWeek," // row[26]
|
"FirstDayOfWeek," // row[27]
|
||||||
"DateFormat," // row[27]
|
"DateFormat," // row[28]
|
||||||
"Theme," // row[28]
|
"Theme," // row[29]
|
||||||
"IconSet," // row[29]
|
"IconSet," // row[30]
|
||||||
"Menu," // row[30]
|
"Menu," // row[31]
|
||||||
"SideCols," // row[31]
|
"SideCols," // row[32]
|
||||||
"ThirdPartyCookies" // row[32]
|
"ThirdPartyCookies" // row[33]
|
||||||
" FROM usr_data"
|
" FROM usr_data"
|
||||||
" WHERE UsrCod=%ld",
|
" WHERE UsrCod=%ld",
|
||||||
UsrDat->UsrCod);
|
UsrDat->UsrCod);
|
||||||
|
@ -605,59 +608,60 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,Usr_GetPrefs_t GetPrefs)
|
||||||
/* Get photo visibility (row[7]) */
|
/* Get photo visibility (row[7]) */
|
||||||
UsrDat->PhotoVisibility = Pri_GetVisibilityFromStr (row[7]);
|
UsrDat->PhotoVisibility = Pri_GetVisibilityFromStr (row[7]);
|
||||||
|
|
||||||
/* Get profile visibility (row[8]) */
|
/* Get profile visibility (row[8], row[9]) */
|
||||||
UsrDat->ProfileVisibility = Pri_GetVisibilityFromStr (row[8]);
|
UsrDat->BaPrfVisibility = Pri_GetVisibilityFromStr (row[8]);
|
||||||
|
UsrDat->ExPrfVisibility = Pri_GetVisibilityFromStr (row[9]);
|
||||||
|
|
||||||
/* Get country (row[9]) */
|
/* Get country (row[10]) */
|
||||||
UsrDat->CtyCod = Str_ConvertStrCodToLongCod (row[9]);
|
UsrDat->CtyCod = Str_ConvertStrCodToLongCod (row[10]);
|
||||||
|
|
||||||
/* Get institution country (row[10]) and institution (row[11]) */
|
/* Get institution country (row[11]) and institution (row[12]) */
|
||||||
UsrDat->InsCtyCod = Str_ConvertStrCodToLongCod (row[10]);
|
UsrDat->InsCtyCod = Str_ConvertStrCodToLongCod (row[11]);
|
||||||
UsrDat->InsCod = Str_ConvertStrCodToLongCod (row[11]);
|
UsrDat->InsCod = Str_ConvertStrCodToLongCod (row[12]);
|
||||||
|
|
||||||
/* Get department (row[12]) */
|
/* Get department (row[13]) */
|
||||||
UsrDat->Tch.DptCod = Str_ConvertStrCodToLongCod (row[12]);
|
UsrDat->Tch.DptCod = Str_ConvertStrCodToLongCod (row[13]);
|
||||||
|
|
||||||
/* Get centre (row[13]) */
|
/* Get centre (row[14]) */
|
||||||
UsrDat->Tch.CtrCod = Str_ConvertStrCodToLongCod (row[13]);
|
UsrDat->Tch.CtrCod = Str_ConvertStrCodToLongCod (row[14]);
|
||||||
|
|
||||||
/* Get office (row[14]) and office phone (row[15]) */
|
/* Get office (row[15]) and office phone (row[16]) */
|
||||||
Str_Copy (UsrDat->Tch.Office,row[14],
|
Str_Copy (UsrDat->Tch.Office,row[15],
|
||||||
Usr_MAX_BYTES_ADDRESS);
|
Usr_MAX_BYTES_ADDRESS);
|
||||||
Str_Copy (UsrDat->Tch.OfficePhone,row[15],
|
Str_Copy (UsrDat->Tch.OfficePhone,row[16],
|
||||||
Usr_MAX_BYTES_PHONE);
|
Usr_MAX_BYTES_PHONE);
|
||||||
|
|
||||||
/* Get local address (row[16]) and local phone (row[17]) */
|
/* Get local address (row[17]) and local phone (row[18]) */
|
||||||
Str_Copy (UsrDat->LocalAddress,row[16],
|
Str_Copy (UsrDat->LocalAddress,row[17],
|
||||||
Usr_MAX_BYTES_ADDRESS);
|
Usr_MAX_BYTES_ADDRESS);
|
||||||
Str_Copy (UsrDat->LocalPhone,row[17],
|
Str_Copy (UsrDat->LocalPhone,row[18],
|
||||||
Usr_MAX_BYTES_PHONE);
|
Usr_MAX_BYTES_PHONE);
|
||||||
|
|
||||||
/* Get local address (row[18]) and local phone (row[19]) */
|
/* Get local address (row[19]) and local phone (row[20]) */
|
||||||
Str_Copy (UsrDat->FamilyAddress,row[18],
|
Str_Copy (UsrDat->FamilyAddress,row[19],
|
||||||
Usr_MAX_BYTES_ADDRESS);
|
Usr_MAX_BYTES_ADDRESS);
|
||||||
Str_Copy (UsrDat->FamilyPhone,row[19],
|
Str_Copy (UsrDat->FamilyPhone,row[20],
|
||||||
Usr_MAX_BYTES_PHONE);
|
Usr_MAX_BYTES_PHONE);
|
||||||
|
|
||||||
/* Get origin place (row[20]) */
|
/* Get origin place (row[21]) */
|
||||||
Str_Copy (UsrDat->OriginPlace,row[20],
|
Str_Copy (UsrDat->OriginPlace,row[21],
|
||||||
Usr_MAX_BYTES_ADDRESS);
|
Usr_MAX_BYTES_ADDRESS);
|
||||||
|
|
||||||
/* Get birthday (row[21]) */
|
/* Get birthday (row[22]) */
|
||||||
Dat_GetDateFromYYYYMMDD (&(UsrDat->Birthday),row[21]);
|
Dat_GetDateFromYYYYMMDD (&(UsrDat->Birthday),row[22]);
|
||||||
Dat_ConvDateToDateStr (&(UsrDat->Birthday),UsrDat->StrBirthday);
|
Dat_ConvDateToDateStr (&(UsrDat->Birthday),UsrDat->StrBirthday);
|
||||||
|
|
||||||
/* Get comments (row[22]) */
|
/* Get comments (row[23]) */
|
||||||
Usr_GetUsrCommentsFromString (row[22] ? row[22] :
|
Usr_GetUsrCommentsFromString (row[23] ? row[23] :
|
||||||
"",
|
"",
|
||||||
UsrDat);
|
UsrDat);
|
||||||
|
|
||||||
/* Get on which events the user wants to be notified inside the platform (row[23]) */
|
/* Get on which events the user wants to be notified inside the platform (row[24]) */
|
||||||
if (sscanf (row[23],"%u",&UsrDat->NtfEvents.CreateNotif) != 1)
|
if (sscanf (row[24],"%u",&UsrDat->NtfEvents.CreateNotif) != 1)
|
||||||
UsrDat->NtfEvents.CreateNotif = (unsigned) -1; // 0xFF..FF
|
UsrDat->NtfEvents.CreateNotif = (unsigned) -1; // 0xFF..FF
|
||||||
|
|
||||||
/* Get on which events the user wants to be notified by email (row[24]) */
|
/* Get on which events the user wants to be notified by email (row[25]) */
|
||||||
if (sscanf (row[24],"%u",&UsrDat->NtfEvents.SendEmail) != 1)
|
if (sscanf (row[25],"%u",&UsrDat->NtfEvents.SendEmail) != 1)
|
||||||
UsrDat->NtfEvents.SendEmail = 0;
|
UsrDat->NtfEvents.SendEmail = 0;
|
||||||
if (UsrDat->NtfEvents.SendEmail >= (1 << Ntf_NUM_NOTIFY_EVENTS)) // Maximum binary value for NotifyEvents is 000...0011...11
|
if (UsrDat->NtfEvents.SendEmail >= (1 << Ntf_NUM_NOTIFY_EVENTS)) // Maximum binary value for NotifyEvents is 000...0011...11
|
||||||
UsrDat->NtfEvents.SendEmail = 0;
|
UsrDat->NtfEvents.SendEmail = 0;
|
||||||
|
@ -665,50 +669,50 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,Usr_GetPrefs_t GetPrefs)
|
||||||
/***** Get user's preferences *****/
|
/***** Get user's preferences *****/
|
||||||
if (GetPrefs == Usr_GET_PREFS)
|
if (GetPrefs == Usr_GET_PREFS)
|
||||||
{
|
{
|
||||||
/* Get language (row[25]) */
|
/* Get language (row[26]) */
|
||||||
UsrDat->Prefs.Language = Lan_LANGUAGE_UNKNOWN; // Language unknown
|
UsrDat->Prefs.Language = Lan_LANGUAGE_UNKNOWN; // Language unknown
|
||||||
for (Lan = (Lan_Language_t) 1;
|
for (Lan = (Lan_Language_t) 1;
|
||||||
Lan <= Lan_NUM_LANGUAGES;
|
Lan <= Lan_NUM_LANGUAGES;
|
||||||
Lan++)
|
Lan++)
|
||||||
if (!strcasecmp (row[25],Lan_STR_LANG_ID[Lan]))
|
if (!strcasecmp (row[26],Lan_STR_LANG_ID[Lan]))
|
||||||
{
|
{
|
||||||
UsrDat->Prefs.Language = Lan;
|
UsrDat->Prefs.Language = Lan;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get first day of week (row[26]) */
|
/* Get first day of week (row[27]) */
|
||||||
UsrDat->Prefs.FirstDayOfWeek = Cal_GetFirstDayOfWeekFromStr (row[26]);
|
UsrDat->Prefs.FirstDayOfWeek = Cal_GetFirstDayOfWeekFromStr (row[27]);
|
||||||
|
|
||||||
/* Get date format (row[27]) */
|
/* Get date format (row[28]) */
|
||||||
UsrDat->Prefs.DateFormat = Dat_GetDateFormatFromStr (row[27]);
|
UsrDat->Prefs.DateFormat = Dat_GetDateFormatFromStr (row[28]);
|
||||||
|
|
||||||
/* Get theme (row[28]) */
|
/* Get theme (row[29]) */
|
||||||
UsrDat->Prefs.Theme = The_THEME_DEFAULT;
|
UsrDat->Prefs.Theme = The_THEME_DEFAULT;
|
||||||
for (Theme = (The_Theme_t) 0;
|
for (Theme = (The_Theme_t) 0;
|
||||||
Theme < The_NUM_THEMES;
|
Theme < The_NUM_THEMES;
|
||||||
Theme++)
|
Theme++)
|
||||||
if (!strcasecmp (row[28],The_ThemeId[Theme]))
|
if (!strcasecmp (row[29],The_ThemeId[Theme]))
|
||||||
{
|
{
|
||||||
UsrDat->Prefs.Theme = Theme;
|
UsrDat->Prefs.Theme = Theme;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get icon set (row[29]) */
|
/* Get icon set (row[30]) */
|
||||||
UsrDat->Prefs.IconSet = Ico_ICON_SET_DEFAULT;
|
UsrDat->Prefs.IconSet = Ico_ICON_SET_DEFAULT;
|
||||||
for (IconSet = (Ico_IconSet_t) 0;
|
for (IconSet = (Ico_IconSet_t) 0;
|
||||||
IconSet < Ico_NUM_ICON_SETS;
|
IconSet < Ico_NUM_ICON_SETS;
|
||||||
IconSet++)
|
IconSet++)
|
||||||
if (!strcasecmp (row[29],Ico_IconSetId[IconSet]))
|
if (!strcasecmp (row[30],Ico_IconSetId[IconSet]))
|
||||||
{
|
{
|
||||||
UsrDat->Prefs.IconSet = IconSet;
|
UsrDat->Prefs.IconSet = IconSet;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get menu (row[30]) */
|
/* Get menu (row[31]) */
|
||||||
UsrDat->Prefs.Menu = Mnu_GetMenuFromStr (row[28]);
|
UsrDat->Prefs.Menu = Mnu_GetMenuFromStr (row[31]);
|
||||||
|
|
||||||
/* Get if user wants to show side columns (row[31]) */
|
/* Get if user wants to show side columns (row[32]) */
|
||||||
if (sscanf (row[29],"%u",&UsrDat->Prefs.SideCols) == 1)
|
if (sscanf (row[32],"%u",&UsrDat->Prefs.SideCols) == 1)
|
||||||
{
|
{
|
||||||
if (UsrDat->Prefs.SideCols > Lay_SHOW_BOTH_COLUMNS)
|
if (UsrDat->Prefs.SideCols > Lay_SHOW_BOTH_COLUMNS)
|
||||||
UsrDat->Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
UsrDat->Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
||||||
|
@ -716,8 +720,8 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,Usr_GetPrefs_t GetPrefs)
|
||||||
else
|
else
|
||||||
UsrDat->Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
UsrDat->Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
||||||
|
|
||||||
/* Get if user accepts third party cookies (row[32]) */
|
/* Get if user accepts third party cookies (row[33]) */
|
||||||
UsrDat->Prefs.AcceptThirdPartyCookies = (row[32][0] == 'Y');
|
UsrDat->Prefs.AcceptThirdPartyCookies = (row[33][0] == 'Y');
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
|
|
|
@ -171,7 +171,8 @@ struct UsrData
|
||||||
bool EmailConfirmed;
|
bool EmailConfirmed;
|
||||||
char Photo [Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]; // Name of public link to photo
|
char Photo [Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]; // Name of public link to photo
|
||||||
Pri_Visibility_t PhotoVisibility; // Who can see user's photo
|
Pri_Visibility_t PhotoVisibility; // Who can see user's photo
|
||||||
Pri_Visibility_t ProfileVisibility; // Who can see user's public profile
|
Pri_Visibility_t BaPrfVisibility; // Who can see user's basic public profile (minimal record card)
|
||||||
|
Pri_Visibility_t ExPrfVisibility; // Who can see user's extended public profile (figures, follow)
|
||||||
long CtyCod; // Country
|
long CtyCod; // Country
|
||||||
char OriginPlace [Usr_MAX_BYTES_ADDRESS + 1];
|
char OriginPlace [Usr_MAX_BYTES_ADDRESS + 1];
|
||||||
struct Date Birthday;
|
struct Date Birthday;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user