From eee8051f7c72a7d67003fdccff91551f796c6ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 13 Jan 2016 18:32:39 +0100 Subject: [PATCH] Version 15.110.17 --- swad_changelog.h | 4 ++-- swad_social.c | 25 +++++++++++++++---------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index e32a9fa43..c39a46c1e 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -121,20 +121,20 @@ // TODO: Limit text of post/comment in social timeline to 1000 characters? Limit textarea to 20 lines not resizeable. // TODO: Sinchronize timeline in other actions // TODO: Optimize Javascript not concatenating big strings in new timeline -// TODO: Review code related to Soc_MAX_RECENT_PUBS_TO_GET // TODO: FIX BUG: Timeline is not shown on user's profile /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.110.16 (2016-01-13)" +#define Log_PLATFORM_VERSION "SWAD 15.110.17 (2016-01-13)" #define CSS_FILE "swad15.110.13.css" #define JS_FILE "swad15.110.13.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.110.17:Jan 13, 2016 Reviewed code related to Soc_MAX_RECENT_PUBS_TO_GET. (192568 lines) Version 15.110.16:Jan 13, 2016 Form to go to public profile of author of comment in timeline. (192563 lines) Version 15.110.15:Jan 13, 2016 Form to go to public profile of author of note in timeline. Extensions '.exe' and '.com' not allowed (Google reported malware). (192543 lines) diff --git a/swad_social.c b/swad_social.c index 3d0e44b16..469b7523b 100644 --- a/swad_social.c +++ b/swad_social.c @@ -55,7 +55,10 @@ // Number of recent publishings got and shown the first time, before refreshing #define Soc_MAX_RECENT_PUBS_TO_SHOW 20 // Publishings to show -// #define Soc_MAX_RECENT_PUBS_TO_GET (Soc_MAX_RECENT_PUBS_TO_SHOW+1) // Publishings to get +/* Try to get one more publishing that the number of publishings to show + For example, if the number of publishings to show is 10, try to get 11 + If the number of publishings shown is lesser than the number of publishing got ==> show link to get old publishings */ +#define Soc_MAX_RECENT_PUBS_TO_GET (Soc_MAX_RECENT_PUBS_TO_SHOW+1) // Publishings to get // Number of old publishings got and shown when I want to see old publishings #define Soc_MAX_OLD_PUBS_TO_GET_AND_SHOW 20 // If you change this number, set also this constant to the new value in JavaScript @@ -300,7 +303,7 @@ void Soc_ShowTimelineUsr (void) " WHERE PublisherCod='%ld'" " ORDER BY PubCod DESC LIMIT %u", Gbl.Usrs.Other.UsrDat.UsrCod, - Soc_MAX_RECENT_PUBS_TO_SHOW); + Soc_MAX_RECENT_PUBS_TO_GET); /***** Show timeline *****/ sprintf (Gbl.Title,Txt_Public_activity_OF_A_USER,Gbl.Usrs.Other.UsrDat.FirstName); @@ -433,7 +436,7 @@ static void Soc_BuildQueryToGetTimelineGbl (Soc_WhatToGetFromTimeline_t WhatToGe " AND NotCod NOT IN (SELECT NotCod FROM current_timeline)" " GROUP BY NotCod" " ORDER BY NewestPubForNote DESC LIMIT %u", - Soc_MAX_RECENT_PUBS_TO_SHOW); + Soc_MAX_RECENT_PUBS_TO_GET); break; case Soc_GET_ONLY_NEW_PUBS: // Get the publishings (without limit) newer than LastPubCod @@ -593,9 +596,8 @@ static void Soc_ShowTimeline (const char *Query,const char *Title) /***** List recent publishings in timeline *****/ fprintf (Gbl.F.Out,"