diff --git a/swad_changelog.h b/swad_changelog.h index 794b20157..ab81c81fa 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -199,14 +199,16 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.139 (2017-02-17)" +#define Log_PLATFORM_VERSION "SWAD 16.139.1 (2017-02-17)" #define CSS_FILE "swad16.136.css" #define JS_FILE "swad16.123.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 16.139: Feb 17, 2017 Fixed bugs showing my public profile. (? lines) + Version 16.139.1: Feb 17, 2017 Code refactoring in parameters related to social timeline. (212817 lines) + Version 16.139: Feb 17, 2017 Fixed bugs showing my public profile. + Fixed bugs in user timeline. (212819 lines) 1 change necessary in database: DELETE FROM actions WHERE ActCod='1637'; diff --git a/swad_layout.c b/swad_layout.c index 62fd98ffe..9296e98c0 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -724,7 +724,7 @@ static void Lay_WriteScriptParamsAJAX (void) Act_Actions[ActRefNewSocPubGbl].ActCod, Act_Actions[ActRefOldSocPubGbl].ActCod); else if (Gbl.Action.Act == ActSeeOthPubPrf || - Gbl.Action.Act == ActRcvSocPstUsr || + Gbl.Action.Act == ActRcvSocPstUsr || Gbl.Action.Act == ActRcvSocComUsr || Gbl.Action.Act == ActShaSocNotUsr || Gbl.Action.Act == ActUnsSocNotUsr || @@ -745,9 +745,9 @@ static void Lay_WriteScriptParamsAJAX (void) Nck_GetNicknameFromUsrCod (Gbl.Usrs.Other.UsrDat.UsrCod, Gbl.Usrs.Other.UsrDat.Nickname); fprintf (Gbl.F.Out,"var RefreshParamNxtActOldPub = \"act=%ld\";\n" - "var RefreshParamUsr = \"usr=@%s\";\n", + "var RefreshParamUsr = \"OtherUsrCod=%s\";\n", Act_Actions[ActRefOldSocPubUsr].ActCod, - Gbl.Usrs.Other.UsrDat.Nickname); + Gbl.Usrs.Other.UsrDat.EncryptedUsrCod); } /***** Parameters with code of session and current course code *****/ diff --git a/swad_parameter.c b/swad_parameter.c index 1ca819930..56652a6c9 100644 --- a/swad_parameter.c +++ b/swad_parameter.c @@ -692,10 +692,7 @@ void Par_GetMainParameters (void) // and to refresh old publishings in user's timeline // If user does not exist ==> UsrCod = -1 Gbl.Usrs.Other.UsrDat.UsrCod = Nck_GetUsrCodFromNickname (Gbl.Usrs.Other.UsrDat.Nickname); - if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) - Gbl.Action.Act = ActSeeOthPubPrf; // Set default action if no other is specified - else - Gbl.Usrs.Other.UsrDat.UsrCod = -1L; + Gbl.Action.Act = ActSeeOthPubPrf; // Set default action if no other is specified } } else if (Par_GetParToText ("agd",Nickname,Nck_MAX_BYTES_NICKNAME_FROM_FORM)) diff --git a/swad_social.c b/swad_social.c index a6207d362..958bfaca9 100644 --- a/swad_social.c +++ b/swad_social.c @@ -435,9 +435,9 @@ void Soc_RefreshOldTimelineGbl (void) void Soc_RefreshOldTimelineUsr (void) { - /***** If user exists, show old publishings *****/ - // User's code is already taken from nickname in Par_GetMainParameters () - if (Usr_ChkIfUsrCodExists (Gbl.Usrs.Other.UsrDat.UsrCod)) // Existing user + /***** Get user whom profile is displayed *****/ + if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) // Existing user + /***** If user exists, show old publishings *****/ Soc_GetAndShowOldTimeline (Soc_TIMELINE_USR); }