mirror of https://github.com/acanas/swad-core.git
Version 20.36.17: Feb 27, 2021 Query moved to module swad_timeline_database.
This commit is contained in:
parent
bf6f4616b4
commit
c28559868d
|
@ -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.16 (2021-02-27)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.36.17 (2021-02-27)"
|
||||
#define CSS_FILE "swad20.33.9.css"
|
||||
#define JS_FILE "swad20.6.2.js"
|
||||
/*
|
||||
|
@ -601,6 +601,7 @@ 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.17: Feb 27, 2021 Query moved to module swad_timeline_database. (305328 lines)
|
||||
Version 20.36.16: Feb 27, 2021 Query moved to module swad_timeline_database. (305317 lines)
|
||||
Version 20.36.15: Feb 27, 2021 Functions moved to module swad_timeline_database. (305305 lines)
|
||||
Version 20.36.14: Feb 27, 2021 Query moved to module swad_timeline_database. (305300 lines)
|
||||
|
|
|
@ -348,6 +348,24 @@ long TL_DB_GetMedCodFromPost (long PubCod)
|
|||
return TL_DB_GetMedCodFromPub (PubCod,"tl_posts");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Insert post content in database ***********************/
|
||||
/*****************************************************************************/
|
||||
// Returns code of just created post
|
||||
|
||||
long TL_DB_CreateNewPost (const struct TL_Pst_PostContent *Content)
|
||||
{
|
||||
/***** Insert post content in the database *****/
|
||||
return
|
||||
DB_QueryINSERTandReturnCode ("can not create post",
|
||||
"INSERT INTO tl_posts"
|
||||
" (Txt,MedCod)"
|
||||
" VALUES"
|
||||
" ('%s',%ld)",
|
||||
Content->Txt,
|
||||
Content->Media.MedCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Remove post from database *************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -70,6 +70,7 @@ void TL_DB_RemoveNote (long NotCod,long PublisherCod);
|
|||
/* Posts */
|
||||
unsigned TL_DB_GetPostByCod (long PstCod,MYSQL_RES **mysql_res);
|
||||
long TL_DB_GetMedCodFromPost (long PubCod);
|
||||
long TL_DB_CreateNewPost (const struct TL_Pst_PostContent *Content);
|
||||
void TL_DB_RemovePost (long PstCod);
|
||||
|
||||
/* Comments */
|
||||
|
|
|
@ -270,14 +270,7 @@ static long TL_Pst_ReceivePost (void)
|
|||
|
||||
/***** Publish *****/
|
||||
/* Insert post content in the database */
|
||||
PstCod =
|
||||
DB_QueryINSERTandReturnCode ("can not create post",
|
||||
"INSERT INTO tl_posts"
|
||||
" (Txt,MedCod)"
|
||||
" VALUES"
|
||||
" ('%s',%ld)",
|
||||
Content.Txt,
|
||||
Content.Media.MedCod);
|
||||
PstCod = TL_DB_CreateNewPost (&Content);
|
||||
|
||||
/* Insert post in notes */
|
||||
TL_Not_StoreAndPublishNoteInternal (TL_NOTE_POST,PstCod,&Pub);
|
||||
|
|
Loading…
Reference in New Issue