From c2c60888078f8630a87ca145771fe7378938dab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 17 Jan 2016 02:49:39 +0100 Subject: [PATCH] Version 15.114.4 --- swad_action.c | 2 +- swad_changelog.h | 4 +++- swad_layout.c | 14 +++++++++++--- swad_social.c | 6 +++--- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/swad_action.c b/swad_action.c index cb0c24c7c..7746a749a 100644 --- a/swad_action.c +++ b/swad_action.c @@ -2334,7 +2334,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActSeeChtRms */{ 51, 3,TabSoc,ActSeeChtRms ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Cht_ShowChatRooms ,"chat64x64.gif" }, /* ActRcvSocPstGbl */{1492,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ReceiveSocialPostGbl ,NULL}, - /* ActRcvSocComUsr */{1503,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ReceiveCommentGbl ,NULL}, + /* ActRcvSocComGbl */{1503,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ReceiveCommentGbl ,NULL}, /* ActShaSocNotGbl */{1495,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ShareSocialNoteGbl ,NULL}, /* ActUnsSocPubGbl */{1496,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_UnshareSocialNoteGbl ,NULL}, /* ActReqRemSocPubGbl*/{1494,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RequestRemSocialNoteGbl ,NULL}, diff --git a/swad_changelog.h b/swad_changelog.h index 1fdd6c76b..b84b93ec7 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -124,13 +124,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.114.2 (2016-01-17)" +#define Log_PLATFORM_VERSION "SWAD 15.114.4 (2016-01-17)" #define CSS_FILE "swad15.113.8.css" #define JS_FILE "swad15.113.8.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.114.4: Jan 17, 2016 Change related to button to remove a social post. (? lines) + Version 15.114.3: Jan 17, 2016 Fixed bug when getting timeline. (192820 lines) Version 15.114.2: Jan 17, 2016 Fixed bug when getting timeline. (192811 lines) Version 15.114.1: Jan 17, 2016 Optimized queries to get timeline. (192790 lines) Version 15.114: Jan 17, 2016 Optimized queries to get timeline. (192817 lines) diff --git a/swad_layout.c b/swad_layout.c index 9deb4b4a0..b218622bf 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -614,8 +614,16 @@ static void Lay_WriteScriptInit (void) // Refresh timeline via AJAX fprintf (Gbl.F.Out," setTimeout(\"refreshLastClicks()\",%lu);\n", Cfg_TIME_TO_REFRESH_LAST_CLICKS); - else if (Act_Actions[Gbl.CurrentAct].SuperAction == ActSeeSocTmlGbl) - // In all the actions children of ActSeeSocTmlGbl ==> refresh timeline via AJAX + else if (Gbl.CurrentAct == ActSeeSocTmlGbl || + Gbl.CurrentAct == ActRcvSocPstGbl || + Gbl.CurrentAct == ActRcvSocComGbl || + Gbl.CurrentAct == ActShaSocNotGbl || + Gbl.CurrentAct == ActUnsSocPubGbl || + Gbl.CurrentAct == ActReqRemSocPubGbl || + Gbl.CurrentAct == ActRemSocPubGbl || + Gbl.CurrentAct == ActReqRemSocComGbl || + Gbl.CurrentAct == ActRemSocComGbl) + // Refresh timeline via AJAX fprintf (Gbl.F.Out," setTimeout(\"refreshNewTimeline()\",%lu);\n", Cfg_TIME_TO_REFRESH_SOCIAL_TIMELINE); @@ -643,7 +651,7 @@ static void Lay_WriteScriptParamsAJAX (void) /***** Parameters related with refreshing of social timeline *****/ if (Gbl.CurrentAct == ActSeeSocTmlGbl || Gbl.CurrentAct == ActRcvSocPstGbl || - Gbl.CurrentAct == ActRcvSocComUsr || + Gbl.CurrentAct == ActRcvSocComGbl || Gbl.CurrentAct == ActShaSocNotGbl || Gbl.CurrentAct == ActUnsSocPubGbl || Gbl.CurrentAct == ActReqRemSocPubGbl || diff --git a/swad_social.c b/swad_social.c index 80f2b141e..c53003342 100644 --- a/swad_social.c +++ b/swad_social.c @@ -497,10 +497,10 @@ static void Soc_BuildQueryToGetTimeline (Soc_TimelineUsrOrGbl_t TimelineUsrOrGbl switch (WhatToGetFromTimeline) { case Soc_GET_ONLY_NEW_PUBS: + case Soc_GET_RECENT_TIMELINE: strcpy (SubQueryAlreadyExists," AND NotCod NOT IN" " (SELECT NotCod FROM not_codes)"); break; - case Soc_GET_RECENT_TIMELINE: case Soc_GET_ONLY_OLD_PUBS: strcpy (SubQueryAlreadyExists," AND NotCod NOT IN" " (SELECT NotCod FROM current_timeline)"); @@ -524,10 +524,10 @@ static void Soc_BuildQueryToGetTimeline (Soc_TimelineUsrOrGbl_t TimelineUsrOrGbl switch (WhatToGetFromTimeline) { case Soc_GET_ONLY_NEW_PUBS: + case Soc_GET_RECENT_TIMELINE: strcpy (SubQueryAlreadyExists," AND social_pubs.NotCod NOT IN" " (SELECT NotCod FROM not_codes)"); break; - case Soc_GET_RECENT_TIMELINE: case Soc_GET_ONLY_OLD_PUBS: strcpy (SubQueryAlreadyExists," AND social_pubs.NotCod NOT IN" " (SELECT NotCod FROM current_timeline)"); @@ -1168,7 +1168,7 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot, Soc_ShowUsrsWhoHaveSharedSocialNote (SocNot); /* Put icon to remove this publishing */ - if (IAmTheAuthor && !ShowNoteAlone) + if (IAmTheAuthor) Soc_PutFormToRemoveSocialPublishing (SocNot->NotCod); /* Show comments */