From 721f67b52b2fe01dafceb6ce8e0eb34076dc5fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 26 Jan 2016 09:47:35 +0100 Subject: [PATCH] Version 15.130.1 --- swad_changelog.h | 5 +++-- swad_parameter.c | 16 ++++++++-------- swad_social.c | 4 +--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index be5cd438..924527d5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -121,14 +121,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.130 (2016-01-26)" +#define Log_PLATFORM_VERSION "SWAD 15.130.1 (2016-01-26)" #define CSS_FILE "swad15.121.7.css" #define JS_FILE "swad15.121.7.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.130: Jan 26, 2016 Do not notify new social notes. (194914 lines) + Version 15.130.1: Jan 26, 2016 Fixed bug when mentioning an user who does not exist. (194914 lines) + Version 15.130: Jan 26, 2016 Do not notify new social notes. (194913 lines) 22 changes necessary in database: UPDATE notif SET NotifyEvent= 9 WHERE NotifyEvent=10; UPDATE notif SET NotifyEvent=10 WHERE NotifyEvent=11; diff --git a/swad_parameter.c b/swad_parameter.c index 8769c6f6..1e7e2e1b 100644 --- a/swad_parameter.c +++ b/swad_parameter.c @@ -124,7 +124,6 @@ void Par_GetMainParameters (void) char UnsignedStr[10+1]; unsigned UnsignedNum; char Nickname[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA+1]; - long OtherUsrCod; char LongStr[1+10+1]; char YearStr[2+1]; @@ -162,16 +161,17 @@ void Par_GetMainParameters (void) Gbl.Action.Act = ActUnk; /***** Get another user's nickname, if exists - (this nickname is used to get another user's info, + (this nickname is used to go to another user's profile, not to get the logged user) *****/ if (Par_GetParToText ("usr",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA)) if (Nickname[0]) - if ((OtherUsrCod = Nck_GetUsrCodFromNickname (Nickname)) > 0) - { - Gbl.Usrs.Other.UsrDat.UsrCod = OtherUsrCod; // Used to go to public profile - // and to refresh old publishings in user's timeline - Gbl.Action.Act = ActSeePubPrf; // Set default action if no other is specified - } + { + // This user's code is used to go to public profile + // and to refresh old publishings in user's timeline + // If user does not exist ==> UsrCod = -1 + Gbl.Usrs.Other.UsrDat.UsrCod = Nck_GetUsrCodFromNickname (Nickname); + Gbl.Action.Act = ActSeePubPrf; // Set default action if no other is specified + } /***** Get action to perform *****/ Par_GetParToText ("act",UnsignedStr,10); diff --git a/swad_social.c b/swad_social.c index 4bc85f95..611ad7e5 100644 --- a/swad_social.c +++ b/swad_social.c @@ -407,9 +407,6 @@ static void Soc_GetAndShowNewTimeline (Soc_TimelineUsrOrGbl_t TimelineUsrOrGbl) /***** Drop temporary tables *****/ Soc_DropTemporaryTablesUsedToQueryTimeline (); - /***** Mark all my notifications related to timeline as seen *****/ - // Soc_MarkMyNotifAsSeen (); - /***** All the output is made, so don't write anymore *****/ Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; } @@ -457,6 +454,7 @@ static void Soc_GetAndShowOldTimeline (Soc_TimelineUsrOrGbl_t TimelineUsrOrGbl) /*****************************************************************************/ /************ Mark all my notifications about timeline as seen ***************/ /*****************************************************************************/ +// Executed as a priori function void Soc_MarkMyNotifAsSeen (void) {