Version 20.36.40: Mar 01, 2021 Query moved to module swad_timeline_database.

This commit is contained in:
acanas 2021-03-01 13:56:58 +01:00
parent b381e8322c
commit 6d500cf8d2
4 changed files with 18 additions and 7 deletions

View File

@ -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.39 (2021-03-01)"
#define Log_PLATFORM_VERSION "SWAD 20.36.40 (2021-03-01)"
#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.39: Mar 01, 2021 Queries moved to module swad_timeline_database. (? lines)
Version 20.36.40: Mar 01, 2021 Query moved to module swad_timeline_database. (305457 lines)
Version 20.36.39: Mar 01, 2021 Queries moved to module swad_timeline_database. (305448 lines)
Version 20.36.38: Mar 01, 2021 Code refactoring in timeline notifications. (305441 lines)
Version 20.36.37: Mar 01, 2021 Query moved to module swad_timeline_database. (305449 lines)
Version 20.36.36: Mar 01, 2021 Query moved to module swad_timeline_database. (305429 lines)

View File

@ -337,6 +337,18 @@ void TL_DB_RemoveNote (long NotCod)
Gbl.Usrs.Me.UsrDat.UsrCod);
}
/*****************************************************************************/
/******************** Remove all notes created by a user *********************/
/*****************************************************************************/
void TL_DB_RemoveAllNotesUsr (long UsrCod)
{
/***** Remove all notes created by a user *****/
DB_QueryDELETE ("can not remove notes",
"DELETE FROM tl_notes WHERE UsrCod=%ld",
UsrCod);
}
/*****************************************************************************/
/********************* Get data of post using its code ***********************/
/*****************************************************************************/

View File

@ -69,6 +69,7 @@ void TL_DB_ClearTimelineNotesOfSessionFromDB (void);
void TL_DB_RemoveNoteFavs (long NotCod);
void TL_DB_RemoveNotePubs (long NotCod);
void TL_DB_RemoveNote (long NotCod);
void TL_DB_RemoveAllNotesUsr (long UsrCod);
/********************************** Posts ************************************/
unsigned TL_DB_GetPostByCod (long PstCod,MYSQL_RES **mysql_res);

View File

@ -154,11 +154,8 @@ void TL_Usr_RemoveUsrContent (long UsrCod)
" WHERE PublisherCod=%ld",
UsrCod);
/***** Remove all the notes of the user *****/
DB_QueryDELETE ("can not remove notes",
"DELETE FROM tl_notes"
" WHERE UsrCod=%ld",
UsrCod);
/***** Remove all notes of the user *****/
TL_DB_RemoveAllNotesUsr (UsrCod);
}
/*****************************************************************************/