Version 15.133.4

This commit is contained in:
Antonio Cañas Vargas 2016-01-28 13:14:16 +01:00
parent 869b004537
commit bd54e30e59
2 changed files with 24 additions and 5 deletions

View File

@ -123,13 +123,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.133.3 (2016-01-28)"
#define Log_PLATFORM_VERSION "SWAD 15.133.4 (2016-01-28)"
#define CSS_FILE "swad15.131.2.css"
#define JS_FILE "swad15.131.3.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.133.4: Jan 28, 2016 Fixed bug in notifications about timeline events. Reported by Juan Miguel Boyero Corral. (195272 lines)
Version 15.133.3: Jan 28, 2016 Changes in query to get users to follow. (195256 lines)
1 change necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1520','es','N','A quién seguir');

View File

@ -4423,6 +4423,7 @@ void Soc_GetNotifSocialPublishing (char *SummaryStr,char **ContentStr,long PubCo
struct SocialPublishing SocPub;
struct SocialNote SocNot;
char Content[Cns_MAX_BYTES_LONG_TEXT+1];
bool ContentCopied = false;
/***** Return nothing on error *****/
SocPub.PubType = Soc_PUB_UNKNOWN;
@ -4473,6 +4474,14 @@ void Soc_GetNotifSocialPublishing (char *SummaryStr,char **ContentStr,long PubCo
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** Copy content string *****/
if (GetContent)
if ((*ContentStr = (char *) malloc (strlen (Content)+1)) != NULL)
{
strcpy (*ContentStr,Content);
ContentCopied = true;
}
/***** Copy summary string *****/
Str_LimitLengthHTMLStr (Content,MaxChars);
strcpy (SummaryStr,Content);
@ -4498,17 +4507,26 @@ void Soc_GetNotifSocialPublishing (char *SummaryStr,char **ContentStr,long PubCo
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** Copy content string *****/
if (GetContent)
if ((*ContentStr = (char *) malloc (strlen (Content)+1)) != NULL)
{
strcpy (*ContentStr,Content);
ContentCopied = true;
}
/***** Copy summary string *****/
Str_LimitLengthHTMLStr (Content,MaxChars);
strcpy (SummaryStr,Content);
break;
}
/***** Copy content string *****/
if (GetContent)
if ((*ContentStr = (char *) malloc (strlen (Content)+1)) != NULL)
strcpy (*ContentStr,Content);
/***** Create empty content string if nothing copied *****/
if (GetContent && !ContentCopied)
if ((*ContentStr = (char *) malloc (1)) != NULL)
(*ContentStr)[0] = '\0';
}
/*****************************************************************************/
/*** Create a notification about mention for any nickname in a publishing ****/
/*****************************************************************************/