Version 15.133.1

This commit is contained in:
Antonio Cañas Vargas 2016-01-27 23:40:16 +01:00
parent 5106642ec1
commit 41a3a7a143
4 changed files with 21 additions and 20 deletions

View File

@ -123,16 +123,17 @@
/****************************** Public constants *****************************/ /****************************** 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 CSS_FILE "swad15.131.2.css"
#define JS_FILE "swad15.131.3.js" #define JS_FILE "swad15.131.3.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // 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 // 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.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.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: 2 changes necessary in database:
CREATE INDEX PhotoVisibility ON usr_data (PhotoVisibility); CREATE INDEX PhotoVisibility ON usr_data (PhotoVisibility);
CREATE INDEX ProfileVisibility ON usr_data (ProfileVisibility); CREATE INDEX ProfileVisibility ON usr_data (ProfileVisibility);

View File

@ -73,7 +73,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
static void Fol_ShowFollowedOrFollower (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) 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) void Fol_SuggestWhoToFollow (void)

View File

@ -127,7 +127,7 @@ char *Prf_GetURLPublicProfile (char *URL,const char *NicknameWithoutArroba)
void Prf_RequestUserProfile (void) void Prf_RequestUserProfile (void)
{ {
/***** Put links to suggests users to follow *****/ /***** Put link to show users to follow *****/
Fol_PutLinkWhoToFollow (); Fol_PutLinkWhoToFollow ();
/* By default, the nickname is filled with my nickname /* By default, the nickname is filled with my nickname
@ -192,9 +192,6 @@ void Prf_GetUsrDatAndShowUserProfile (void)
if (Error) if (Error)
{ {
/***** Put links to suggests users to follow *****/
Fol_PutLinkWhoToFollow ();
/* Show error message */ /* Show error message */
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); 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 UsrFollowsMe;
bool IFollowUsr; bool IFollowUsr;
/***** Contextual links *****/
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
{
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
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,"</div>");
}
else
/***** Put link to show users to follow *****/
Fol_PutLinkWhoToFollow ();
/***** Check if I can see the public profile *****/ /***** Check if I can see the public profile *****/
if (Pri_ShowIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility, if (Pri_ShowIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility,
Gbl.Usrs.Other.UsrDat.UsrCod)) 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,"<div class=\"CONTEXT_MENU\">");
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,"</div>");
}
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
{ {
/* Get user's role in current course */ /* Get user's role in current course */

View File

@ -335,7 +335,7 @@ static void Soc_ShowTimelineGblHighlightingNot (long NotCod)
/***** Check if I follow someone *****/ /***** Check if I follow someone *****/
if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod)) if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
{ {
/***** Put links to suggests users to follow *****/ /***** Put link to show users to follow *****/
Fol_PutLinkWhoToFollow (); Fol_PutLinkWhoToFollow ();
/***** Show warning if I do not follow anyone *****/ /***** Show warning if I do not follow anyone *****/