mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-28 19:35:42 +02:00
Version 15.110.17
This commit is contained in:
parent
f8b4fcbba5
commit
eee8051f7c
|
@ -121,20 +121,20 @@
|
||||||
// TODO: Limit text of post/comment in social timeline to 1000 characters? Limit textarea to 20 lines not resizeable.
|
// 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: Sinchronize timeline in other actions
|
||||||
// TODO: Optimize Javascript not concatenating big strings in new timeline
|
// 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
|
// TODO: FIX BUG: Timeline is not shown on user's profile
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** 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 CSS_FILE "swad15.110.13.css"
|
||||||
#define JS_FILE "swad15.110.13.js"
|
#define JS_FILE "swad15.110.13.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.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.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.
|
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)
|
Extensions '.exe' and '.com' not allowed (Google reported malware). (192543 lines)
|
||||||
|
|
|
@ -55,7 +55,10 @@
|
||||||
|
|
||||||
// Number of recent publishings got and shown the first time, before refreshing
|
// 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_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
|
// 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
|
#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'"
|
" WHERE PublisherCod='%ld'"
|
||||||
" ORDER BY PubCod DESC LIMIT %u",
|
" ORDER BY PubCod DESC LIMIT %u",
|
||||||
Gbl.Usrs.Other.UsrDat.UsrCod,
|
Gbl.Usrs.Other.UsrDat.UsrCod,
|
||||||
Soc_MAX_RECENT_PUBS_TO_SHOW);
|
Soc_MAX_RECENT_PUBS_TO_GET);
|
||||||
|
|
||||||
/***** Show timeline *****/
|
/***** Show timeline *****/
|
||||||
sprintf (Gbl.Title,Txt_Public_activity_OF_A_USER,Gbl.Usrs.Other.UsrDat.FirstName);
|
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)"
|
" AND NotCod NOT IN (SELECT NotCod FROM current_timeline)"
|
||||||
" GROUP BY NotCod"
|
" GROUP BY NotCod"
|
||||||
" ORDER BY NewestPubForNote DESC LIMIT %u",
|
" ORDER BY NewestPubForNote DESC LIMIT %u",
|
||||||
Soc_MAX_RECENT_PUBS_TO_SHOW);
|
Soc_MAX_RECENT_PUBS_TO_GET);
|
||||||
break;
|
break;
|
||||||
case Soc_GET_ONLY_NEW_PUBS:
|
case Soc_GET_ONLY_NEW_PUBS:
|
||||||
// Get the publishings (without limit) newer than LastPubCod
|
// 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 *****/
|
/***** List recent publishings in timeline *****/
|
||||||
fprintf (Gbl.F.Out,"<ul id=\"timeline_list\" class=\"LIST_LEFT\">");
|
fprintf (Gbl.F.Out,"<ul id=\"timeline_list\" class=\"LIST_LEFT\">");
|
||||||
// NumPubsToShow = (NumPubsGot <= Soc_MAX_RECENT_PUBS_TO_SHOW) ? NumPubsGot :
|
NumPubsToShow = (NumPubsGot <= Soc_MAX_RECENT_PUBS_TO_SHOW) ? NumPubsGot :
|
||||||
// Soc_MAX_RECENT_PUBS_TO_SHOW;
|
Soc_MAX_RECENT_PUBS_TO_SHOW;
|
||||||
NumPubsToShow = NumPubsGot;
|
|
||||||
for (NumPub = 0;
|
for (NumPub = 0;
|
||||||
NumPub < NumPubsToShow;
|
NumPub < NumPubsToShow;
|
||||||
NumPub++)
|
NumPub++)
|
||||||
|
@ -612,7 +614,9 @@ static void Soc_ShowTimeline (const char *Query,const char *Title)
|
||||||
AlreadyWasInTimeline = Soc_StoreSocialNoteInTimeline (SocNot.NotCod);
|
AlreadyWasInTimeline = Soc_StoreSocialNoteInTimeline (SocNot.NotCod);
|
||||||
|
|
||||||
/* Write social note */
|
/* Write social note */
|
||||||
if (!AlreadyWasInTimeline)
|
if (!AlreadyWasInTimeline) // This check is not necessary
|
||||||
|
// because we have got publishing
|
||||||
|
// not yet in timeline
|
||||||
{
|
{
|
||||||
// fprintf (Gbl.F.Out,"<li>PubCod %ld:</li>",SocPub.PubCod);
|
// fprintf (Gbl.F.Out,"<li>PubCod %ld:</li>",SocPub.PubCod);
|
||||||
Soc_WriteSocialNote (&SocNot,&SocPub,false,true);
|
Soc_WriteSocialNote (&SocNot,&SocPub,false,true);
|
||||||
|
@ -623,8 +627,7 @@ static void Soc_ShowTimeline (const char *Query,const char *Title)
|
||||||
/***** Store first publishing code into session *****/
|
/***** Store first publishing code into session *****/
|
||||||
Soc_UpdateFirstPubCodIntoSession (SocPub.PubCod);
|
Soc_UpdateFirstPubCodIntoSession (SocPub.PubCod);
|
||||||
|
|
||||||
// if (NumPubsGot > Soc_MAX_RECENT_PUBS_TO_SHOW)
|
if (NumPubsGot > Soc_MAX_RECENT_PUBS_TO_SHOW)
|
||||||
if (NumPubsToShow == Soc_MAX_RECENT_PUBS_TO_SHOW)
|
|
||||||
{
|
{
|
||||||
/***** Link to view old publishings via AJAX *****/
|
/***** Link to view old publishings via AJAX *****/
|
||||||
Soc_PutLinkToViewOldPublishings ();
|
Soc_PutLinkToViewOldPublishings ();
|
||||||
|
@ -720,7 +723,9 @@ static void Soc_ShowOldPubsInTimeline (const char *Query)
|
||||||
AlreadyWasInTimeline = Soc_StoreSocialNoteInTimeline (SocNot.NotCod);
|
AlreadyWasInTimeline = Soc_StoreSocialNoteInTimeline (SocNot.NotCod);
|
||||||
|
|
||||||
/* Write social note */
|
/* Write social note */
|
||||||
if (!AlreadyWasInTimeline)
|
if (!AlreadyWasInTimeline) // This check is not necessary
|
||||||
|
// because we have got publishing
|
||||||
|
// not yet in timeline
|
||||||
{
|
{
|
||||||
// fprintf (Gbl.F.Out,"<li>PubCod %ld:</li>",SocPub.PubCod);
|
// fprintf (Gbl.F.Out,"<li>PubCod %ld:</li>",SocPub.PubCod);
|
||||||
Soc_WriteSocialNote (&SocNot,&SocPub,false,true);
|
Soc_WriteSocialNote (&SocNot,&SocPub,false,true);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user