From 50c786ec5f4e41c39287452e23d1807cac4da0b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 28 Jan 2016 19:58:32 +0100 Subject: [PATCH] Version 15.133.5 --- swad_changelog.h | 5 ++--- swad_profile.c | 26 +++++++++++++++----------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 0552a59d..9a5b6a82 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -117,19 +117,18 @@ // TODO: Go to forum post (or at least to forum thread) from social timeline and notifications? // TODO: Width of column for data in notifications is too short -// TODO: Recommendations about users to follow - /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.133.4 (2016-01-28)" +#define Log_PLATFORM_VERSION "SWAD 15.133.5 (2016-01-28)" #define CSS_FILE "swad15.131.2.css" #define JS_FILE "swad15.131.3.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* + Version 15.133.5: Jan 28, 2016 Unlogged users can not view "Who to follow". (195276 lines) Version 15.133.4: Jan 28, 2016 Fixed bug in notifications about timeline events. Reported by Juan Miguel Boyero Corral. (195272 lines) Version 15.133.3: Jan 28, 2016 Changes in query to get users to follow. (195256 lines) 1 change necessary in database: diff --git a/swad_profile.c b/swad_profile.c index d7a98d26..b3b38f7b 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -128,7 +128,8 @@ char *Prf_GetURLPublicProfile (char *URL,const char *NicknameWithoutArroba) void Prf_RequestUserProfile (void) { /***** Put link to show users to follow *****/ - Fol_PutLinkWhoToFollow (); + if (Gbl.Usrs.Me.Logged) + Fol_PutLinkWhoToFollow (); /* By default, the nickname is filled with my nickname If no user logged ==> the nickname is empty */ @@ -230,18 +231,21 @@ bool Prf_ShowUserProfile (void) bool IFollowUsr; /***** Contextual links *****/ - if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me + if (Gbl.Usrs.Me.Logged) { - fprintf (Gbl.F.Out,"
"); - Rec_PutLinkToChangeMyInsCtrDpt (); // Put link (form) to change my institution, centre, department... - Net_PutLinkToChangeMySocialNetworks (); // Put link (form) to change my social networks - Pho_PutLinkToChangeMyPhoto (); // Put link (form) to change my photo - Pri_PutLinkToChangeMyPrivacy (); // Put link (form) to change my privacy - fprintf (Gbl.F.Out,"
"); + if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me + { + fprintf (Gbl.F.Out,"
"); + Rec_PutLinkToChangeMyInsCtrDpt (); // Put link (form) to change my institution, centre, department... + Net_PutLinkToChangeMySocialNetworks (); // Put link (form) to change my social networks + Pho_PutLinkToChangeMyPhoto (); // Put link (form) to change my photo + Pri_PutLinkToChangeMyPrivacy (); // Put link (form) to change my privacy + fprintf (Gbl.F.Out,"
"); + } + else + /***** Put link to show users to follow *****/ + Fol_PutLinkWhoToFollow (); } - else - /***** Put link to show users to follow *****/ - Fol_PutLinkWhoToFollow (); /***** Check if I can see the public profile *****/ if (Pri_ShowIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility,