diff --git a/swad_changelog.h b/swad_changelog.h index cf515d82..3351dad7 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -123,16 +123,17 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.133 (2016-01-27)" +#define Log_PLATFORM_VERSION "SWAD 15.133.1 (2016-01-27)" #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.1: Jan 27, 2016 Change in link to show users to follow. (195238 lines) Version 15.133: Jan 27, 2016 List users to follow. (195236 lines) Version 15.132.1: Jan 27, 2016 Build query to get users to follow. (195158 lines) - Version 15.132: Jan 27, 2016 Put link to suggest users to follow. (195116 lines) + Version 15.132: Jan 27, 2016 Put link to show users to follow. (195116 lines) 2 changes necessary in database: CREATE INDEX PhotoVisibility ON usr_data (PhotoVisibility); CREATE INDEX ProfileVisibility ON usr_data (ProfileVisibility); diff --git a/swad_follow.c b/swad_follow.c index ab91d990..05135c52 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -73,7 +73,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat, static void Fol_ShowFollowedOrFollower (const struct UsrData *UsrDat); /*****************************************************************************/ -/******************** Put link to suggest users to follow ********************/ +/********************** Put link to show users to follow **********************/ /*****************************************************************************/ void Fol_PutLinkWhoToFollow (void) @@ -88,7 +88,7 @@ void Fol_PutLinkWhoToFollow (void) } /*****************************************************************************/ -/******************** Put link to suggest users to follow ********************/ +/***************************** Show users to follow **************************/ /*****************************************************************************/ void Fol_SuggestWhoToFollow (void) diff --git a/swad_profile.c b/swad_profile.c index 7f7f4c25..d7a98d26 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -127,7 +127,7 @@ char *Prf_GetURLPublicProfile (char *URL,const char *NicknameWithoutArroba) void Prf_RequestUserProfile (void) { - /***** Put links to suggests users to follow *****/ + /***** Put link to show users to follow *****/ Fol_PutLinkWhoToFollow (); /* By default, the nickname is filled with my nickname @@ -192,9 +192,6 @@ void Prf_GetUsrDatAndShowUserProfile (void) if (Error) { - /***** Put links to suggests users to follow *****/ - Fol_PutLinkWhoToFollow (); - /* Show error message */ Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); @@ -232,21 +229,24 @@ bool Prf_ShowUserProfile (void) bool UsrFollowsMe; bool IFollowUsr; + /***** Contextual links *****/ + 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 (); + /***** Check if I can see the public profile *****/ if (Pri_ShowIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility, Gbl.Usrs.Other.UsrDat.UsrCod)) { - /***** Contextual links *****/ - 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,"
"); - } - if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected { /* Get user's role in current course */ diff --git a/swad_social.c b/swad_social.c index 0f511b31..70bbf7ca 100644 --- a/swad_social.c +++ b/swad_social.c @@ -335,7 +335,7 @@ static void Soc_ShowTimelineGblHighlightingNot (long NotCod) /***** Check if I follow someone *****/ if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod)) { - /***** Put links to suggests users to follow *****/ + /***** Put link to show users to follow *****/ Fol_PutLinkWhoToFollow (); /***** Show warning if I do not follow anyone *****/