From 79675f03ced741119817d1a487e4a387b546256d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 6 Mar 2015 22:12:10 +0100 Subject: [PATCH] Version 14.78.3 --- swad_account.c | 4 +- swad_changelog.h | 3 +- swad_enrollment.c | 4 +- swad_photo.c | 50 +++---- swad_photo.h | 2 +- swad_photo_visibility.h => swad_privacy.h | 22 +-- swad_text.c | 167 +++++++++++----------- swad_user.c | 2 +- swad_user.h | 4 +- 9 files changed, 130 insertions(+), 128 deletions(-) rename swad_photo_visibility.h => swad_privacy.h (77%) diff --git a/swad_account.c b/swad_account.c index 42b067017..f67b7e99c 100644 --- a/swad_account.c +++ b/swad_account.c @@ -412,7 +412,7 @@ void Acc_CreateNewUsr (struct UsrData *UsrDat) { extern const char *The_ThemeId[The_NUM_THEMES]; extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS]; - extern const char *Pho_VisibilityDB[Pho_NUM_VISIBILITIES]; + extern const char *Pri_VISIBILITYDB[Pri_NUM_OPTIONS_PRIVACY]; extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES]; extern const char *Usr_StringsSexDB[Usr_NUM_SEXS]; char Query[2048]; @@ -449,7 +449,7 @@ void Acc_CreateNewUsr (struct UsrData *UsrDat) The_ThemeId[UsrDat->Prefs.Theme], Ico_IconSetId[UsrDat->Prefs.IconSet], Txt_STR_LANG_ID[UsrDat->Prefs.Language], - Pho_VisibilityDB[UsrDat->PhotoVisibility], + Pri_VISIBILITYDB[UsrDat->PhotoVisibility], UsrDat->CtyCod, UsrDat->LocalAddress ,UsrDat->LocalPhone, UsrDat->FamilyAddress,UsrDat->FamilyPhone, diff --git a/swad_changelog.h b/swad_changelog.h index 51b61e034..ae589f8c6 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.78.2 (2015/03/06)" +#define Log_PLATFORM_VERSION "SWAD 14.78.3 (2015/03/06)" // 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 | tail -1 /* + Version 14.78.3: Mar 06, 2015 Changes in messages about privacity. (178631 lines) Version 14.78.2: Mar 06, 2015 New action to edit privacy options. (178630 lines) Version 14.78.1: Mar 06, 2015 New link to privacy options (unfinished). (178595 lines) Version 14.78: Mar 06, 2015 Four degrees of visibility in photos. diff --git a/swad_enrollment.c b/swad_enrollment.c index 267fd5859..0b24d70ee 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -372,7 +372,7 @@ void Enr_UpdateUsrData (struct UsrData *UsrDat) { extern const char *The_ThemeId[The_NUM_THEMES]; extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS]; - extern const char *Pho_VisibilityDB[Pho_NUM_VISIBILITIES]; + extern const char *Pri_VISIBILITYDB[Pri_NUM_OPTIONS_PRIVACY]; extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES]; extern const char *Usr_StringsSexDB[Usr_NUM_SEXS]; char Query[2048]; @@ -399,7 +399,7 @@ void Enr_UpdateUsrData (struct UsrData *UsrDat) The_ThemeId[UsrDat->Prefs.Theme], Ico_IconSetId[UsrDat->Prefs.IconSet], Txt_STR_LANG_ID[UsrDat->Prefs.Language], - Pho_VisibilityDB[UsrDat->PhotoVisibility], + Pri_VISIBILITYDB[UsrDat->PhotoVisibility], UsrDat->CtyCod, UsrDat->LocalAddress,UsrDat->LocalPhone, UsrDat->FamilyAddress,UsrDat->FamilyPhone,UsrDat->OriginPlace, diff --git a/swad_photo.c b/swad_photo.c index 27b7927f5..9be530720 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -43,7 +43,7 @@ #include "swad_logo.h" #include "swad_parameter.h" #include "swad_photo.h" -#include "swad_photo_visibility.h" +#include "swad_privacy.h" #include "swad_theme.h" #include "swad_user.h" @@ -58,12 +58,12 @@ extern struct Globals Gbl; /*****************************************************************************/ /***** Photo visibility (who can see user's photo) *****/ -const char *Pho_VisibilityDB[Pho_NUM_VISIBILITIES] = +const char *Pri_VISIBILITYDB[Pri_NUM_OPTIONS_PRIVACY] = { - "user", // Pho_VISIBILITY_USER - "course", // Pho_VISIBILITY_COURSE - "system", // Pho_VISIBILITY_SYSTEM - "world", // Pho_VISIBILITY_WORLD + "user", // Pri_VISIBILITY_USER + "course", // Pri_VISIBILITY_COURSE + "system", // Pri_VISIBILITY_SYSTEM + "world", // Pri_VISIBILITY_WORLD }; /*****************************************************************************/ @@ -791,20 +791,20 @@ bool Pho_ShowUsrPhotoIsAllowed (struct UsrData *UsrDat,char *PhotoURL) /***** Check if I can see the other's photo *****/ switch (UsrDat->PhotoVisibility) { - case Pho_VISIBILITY_USER: // Only visible by me and my teachers if I am a student or me and my students if I am a teacher + case Pri_VISIBILITY_USER: // Only visible by me and my teachers if I am a student or me and my students if I am a teacher if (ItsMe || // I always can see my photo Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SYS_ADM) // A system admin always can see any user's photo ICanSeePhoto = true; else ICanSeePhoto = Usr_CheckIfUsrSharesAnyOfMyCrsWithDifferentRole (UsrDat->UsrCod); // Both users share the same course but whit different role break; - case Pho_VISIBILITY_COURSE: // Visible by users sharing courses with me + case Pri_VISIBILITY_COURSE: // Visible by users sharing courses with me ICanSeePhoto = Usr_CheckIfUsrSharesAnyOfMyCrs (UsrDat->UsrCod); // Both users share the same course break; - case Pho_VISIBILITY_SYSTEM: // Visible by any user logged in platform + case Pri_VISIBILITY_SYSTEM: // Visible by any user logged in platform ICanSeePhoto = Gbl.Usrs.Me.Logged; break; - case Pho_VISIBILITY_WORLD: // Public, visible by all the people, even unlogged visitors + case Pri_VISIBILITY_WORLD: // Public, visible by all the people, even unlogged visitors ICanSeePhoto = true; break; } @@ -1026,8 +1026,8 @@ void Pho_PutFormPhotoVisibility (void) { extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_Photo; - extern const char *Txt_PHOTO_VISIBILITY[Pho_NUM_VISIBILITIES]; - Pho_Visibility_t PhotoVisibility; + extern const char *Txt_PRIVACY_OPTIONS[Pri_NUM_OPTIONS_PRIVACY]; + Pri_VISIBILITY_t PhotoVisibility; /***** Select photo visibility *****/ fprintf (Gbl.F.Out,"" @@ -1042,8 +1042,8 @@ void Pho_PutFormPhotoVisibility (void) Act_FormStart (ActChgPubPho); fprintf (Gbl.F.Out,"