mirror of https://github.com/acanas/swad-core.git
Version 20.41.5: Mar 03, 2021 Code refactoring in timeline.
This commit is contained in:
parent
907824c0c3
commit
07181b2e4d
|
@ -598,10 +598,11 @@ TODO: DNI de un estudiante sale err
|
|||
TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede.
|
||||
TODO: Salvador Romero Cortés: @acanas opción para editar posts
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.41.4 (2021-03-03)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.41.5 (2021-03-03)"
|
||||
#define CSS_FILE "swad20.33.9.css"
|
||||
#define JS_FILE "swad20.6.2.js"
|
||||
/*
|
||||
Version 20.41.5: Mar 03, 2021 Code refactoring in timeline. (305569 lines)
|
||||
Version 20.41.4: Mar 03, 2021 Code refactoring in timeline publications. (305577 lines)
|
||||
Version 20.41.3: Mar 03, 2021 Code refactoring in timeline publications. (305580 lines)
|
||||
Version 20.41.2: Mar 03, 2021 Code refactoring in timeline. (305569 lines)
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "swad_profile.h"
|
||||
#include "swad_timeline.h"
|
||||
#include "swad_timeline_database.h"
|
||||
#include "swad_timeline_favourite.h"
|
||||
#include "swad_timeline_form.h"
|
||||
#include "swad_timeline_note.h"
|
||||
#include "swad_timeline_publication.h"
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "swad_timeline.h"
|
||||
#include "swad_timeline_database.h"
|
||||
#include "swad_timeline_favourite.h"
|
||||
#include "swad_timeline_form.h"
|
||||
#include "swad_timeline_notification.h"
|
||||
#include "swad_timeline_publication.h"
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
/********************************** Headers **********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_timeline_comment.h"
|
||||
#include "swad_timeline_note.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Public constants and types *************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "swad_action.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_timeline.h"
|
||||
#include "swad_timeline_database.h"
|
||||
#include "swad_timeline_favourite.h"
|
||||
#include "swad_timeline_form.h"
|
||||
#include "swad_timeline_share.h"
|
||||
|
|
|
@ -41,10 +41,8 @@
|
|||
#include "swad_profile.h"
|
||||
#include "swad_timeline.h"
|
||||
#include "swad_timeline_database.h"
|
||||
#include "swad_timeline_favourite.h"
|
||||
#include "swad_timeline_form.h"
|
||||
#include "swad_timeline_publication.h"
|
||||
#include "swad_timeline_share.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
|
|
|
@ -322,6 +322,7 @@ static struct TL_Pub_Publication *TL_Pub_SelectTheMostRecentPub (const struct TL
|
|||
MYSQL_RES *mysql_res;
|
||||
struct TL_Pub_Publication *Pub;
|
||||
|
||||
/***** Select the most recent publication from database *****/
|
||||
if (TL_DB_SelectTheMostRecentPub (SubQueries,&mysql_res) == 1)
|
||||
{
|
||||
/* Allocate space for publication */
|
||||
|
@ -351,7 +352,7 @@ void TL_Pub_InsertNewPubsInTimeline (struct TL_Timeline *Timeline)
|
|||
struct TL_Pub_Publication *Pub;
|
||||
struct TL_Not_Note Not;
|
||||
|
||||
/***** List new publications timeline *****/
|
||||
/***** List new publications in timeline *****/
|
||||
for (Pub = Timeline->Pubs.Top;
|
||||
Pub;
|
||||
Pub = Pub->Next)
|
||||
|
@ -523,17 +524,11 @@ void TL_Pub_GetDataOfPubFromNextRow (MYSQL_RES *mysql_res,
|
|||
row[2]: PublisherCod
|
||||
row[3]: PubType
|
||||
*/
|
||||
|
||||
/***** Get code of publication (row[0]) *****/
|
||||
/***** Get code of publication (row[0]), code of note (row[1]),
|
||||
publisher's code (row[2]) and type of publication (row[3]) *****/
|
||||
Pub->PubCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||
|
||||
/***** Get note code (row[1]) *****/
|
||||
Pub->NotCod = Str_ConvertStrCodToLongCod (row[1]);
|
||||
|
||||
/***** Get publisher's code (row[2]) *****/
|
||||
Pub->PublisherCod = Str_ConvertStrCodToLongCod (row[2]);
|
||||
|
||||
/***** Get type of publication (row[3]) *****/
|
||||
Pub->PubType = TL_Pub_GetPubTypeFromStr (row[3]);
|
||||
}
|
||||
|
||||
|
@ -545,6 +540,7 @@ static TL_Pub_PubType_t TL_Pub_GetPubTypeFromStr (const char *Str)
|
|||
{
|
||||
unsigned UnsignedNum;
|
||||
|
||||
/***** Get publication type from string *****/
|
||||
if (sscanf (Str,"%u",&UnsignedNum) == 1)
|
||||
if (UnsignedNum < TL_Pub_NUM_PUB_TYPES)
|
||||
return (TL_Pub_PubType_t) UnsignedNum;
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "swad_global.h"
|
||||
#include "swad_timeline.h"
|
||||
#include "swad_timeline_database.h"
|
||||
#include "swad_timeline_form.h"
|
||||
#include "swad_timeline_notification.h"
|
||||
#include "swad_timeline_publication.h"
|
||||
#include "swad_timeline_share.h"
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
/********************************** Headers **********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_timeline_note.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue