mirror of https://github.com/acanas/swad-core.git
Version 20.36.23: Feb 28, 2021 Function moved to module swad_timeline_database.
This commit is contained in:
parent
a90f967243
commit
7254a2fff0
|
@ -553,7 +553,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.36.22 (2021-02-27)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.36.23 (2021-02-28)"
|
||||
#define CSS_FILE "swad20.33.9.css"
|
||||
#define JS_FILE "swad20.6.2.js"
|
||||
/*
|
||||
|
@ -601,7 +601,8 @@ 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
|
||||
|
||||
Version 20.36.22: Feb 27, 2021 Function moved to module swad_timeline_database. (305387 lines)
|
||||
Version 20.36.23: Feb 28, 2021 Function moved to module swad_timeline_database. (305387 lines)
|
||||
Version 20.36.22: Feb 28, 2021 Query moved to module swad_timeline_database. (305387 lines)
|
||||
Version 20.36.21: Feb 27, 2021 Function moved to module swad_timeline_database. (305376 lines)
|
||||
Version 20.36.20: Feb 27, 2021 Query moved to module swad_timeline_database. (305374 lines)
|
||||
Version 20.36.19: Feb 27, 2021 Queries moved to module swad_timeline_database. (305363 lines)
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
#include "swad_setting.h"
|
||||
#include "swad_theme.h"
|
||||
#include "swad_timeline.h"
|
||||
#include "swad_timeline_publication.h"
|
||||
#include "swad_timeline_database.h"
|
||||
#include "swad_user.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1127,7 +1127,7 @@ static void Prf_GetNumSocialPubsAndStoreAsUsrFigure (long UsrCod)
|
|||
Prf_ResetUsrFigures (&UsrFigures);
|
||||
|
||||
/***** Get number of forum posts from database *****/
|
||||
UsrFigures.NumSocPub = TL_Pub_GetNumPubsUsr (UsrCod);
|
||||
UsrFigures.NumSocPub = TL_DB_GetNumPubsUsr (UsrCod);
|
||||
|
||||
/***** Update number of forum posts in user's figures *****/
|
||||
if (Prf_CheckIfUsrFiguresExists (UsrCod))
|
||||
|
|
|
@ -675,6 +675,19 @@ long TL_DB_GetPubCodFromSession (const char *FieldName,
|
|||
return PubCod;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Get number of publications from a user *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned long TL_DB_GetNumPubsUsr (long UsrCod)
|
||||
{
|
||||
/***** Get number of posts from a user from database *****/
|
||||
return DB_QueryCOUNT ("can not get number of publications from a user",
|
||||
"SELECT COUNT(*) FROM tl_pubs"
|
||||
" WHERE PublisherCod=%ld",
|
||||
UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Insert new publication in database ********************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -97,6 +97,7 @@ unsigned TL_DB_SelectTheMostRecentPub (const struct TL_Pub_SubQueries *SubQuerie
|
|||
long TL_DB_GetNotCodFromPubCod (long PubCod);
|
||||
long TL_DB_GetPubCodFromSession (const char *FieldName,
|
||||
const char SessionId[Cns_BYTES_SESSION_ID + 1]);
|
||||
unsigned long TL_DB_GetNumPubsUsr (long UsrCod);
|
||||
long TL_DB_CreateNewPub (const struct TL_Pub_Publication *Pub);
|
||||
void TL_DB_UpdateFirstPubCodInSession (long FirstPubCod,
|
||||
const char SessionId[Cns_BYTES_SESSION_ID + 1]);
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <stdlib.h> // For malloc and free
|
||||
#include <string.h> // For string functions
|
||||
|
||||
#include "swad_database.h"
|
||||
#include "swad_follow.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_profile.h"
|
||||
|
@ -641,16 +640,3 @@ void TL_Pub_PublishPubInTimeline (struct TL_Pub_Publication *Pub)
|
|||
/***** Increment number of publications in user's figures *****/
|
||||
Prf_IncrementNumPubsUsr (Pub->PublisherCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Get number of publications from a user *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned long TL_Pub_GetNumPubsUsr (long UsrCod)
|
||||
{
|
||||
/***** Get number of posts from a user from database *****/
|
||||
return DB_QueryCOUNT ("can not get number of publications from a user",
|
||||
"SELECT COUNT(*) FROM tl_pubs"
|
||||
" WHERE PublisherCod=%ld",
|
||||
UsrCod);
|
||||
}
|
||||
|
|
|
@ -98,6 +98,4 @@ void TL_Pub_GetDataOfPublicationFromNextRow (MYSQL_RES *mysql_res,
|
|||
|
||||
void TL_Pub_PublishPubInTimeline (struct TL_Pub_Publication *Pub);
|
||||
|
||||
unsigned long TL_Pub_GetNumPubsUsr (long UsrCod);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue