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

This commit is contained in:
acanas 2021-03-01 14:01:55 +01:00
parent 6d500cf8d2
commit dd8d27d5eb
4 changed files with 17 additions and 6 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.40 (2021-03-01)"
#define Log_PLATFORM_VERSION "SWAD 20.36.41 (2021-03-01)"
#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.41: Mar 01, 2021 Query moved to module swad_timeline_database. (305466 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)

View File

@ -343,7 +343,7 @@ void TL_DB_RemoveNote (long NotCod)
void TL_DB_RemoveAllNotesUsr (long UsrCod)
{
/***** Remove all notes created by a user *****/
/***** Remove all notes created by user *****/
DB_QueryDELETE ("can not remove notes",
"DELETE FROM tl_notes WHERE UsrCod=%ld",
UsrCod);
@ -898,6 +898,18 @@ void TL_DB_UpdateFirstLastPubCodsInSession (long FirstPubCod)
Gbl.Session.Id);
}
/*****************************************************************************/
/********************* Remove all publications of a user *********************/
/*****************************************************************************/
void TL_DB_RemoveAllPubsUsr (long UsrCod)
{
/***** Remove all publications of user *****/
DB_QueryDELETE ("can not remove publications",
"DELETE FROM tl_pubs WHERE PublisherCod=%ld",
UsrCod);
}
/*****************************************************************************/
/****************** Check if a user has favourited a note ********************/
/*****************************************************************************/

View File

@ -113,6 +113,7 @@ long TL_DB_CreateNewPub (const struct TL_Pub_Publication *Pub);
void TL_DB_UpdateFirstPubCodInSession (long FirstPubCod);
void TL_DB_UpdateLastPubCodInSession (void);
void TL_DB_UpdateFirstLastPubCodsInSession (long FirstPubCod);
void TL_DB_RemoveAllPubsUsr (long UsrCod);
/****************************** Favourites ***********************************/
bool TL_DB_CheckIfFavedByUsr (TL_Fav_WhatToFav_t WhatToFav,

View File

@ -149,10 +149,7 @@ void TL_Usr_RemoveUsrContent (long UsrCod)
UsrCod);
/***** Remove all the publications of the user *****/
DB_QueryDELETE ("can not remove publications",
"DELETE FROM tl_pubs"
" WHERE PublisherCod=%ld",
UsrCod);
TL_DB_RemoveAllPubsUsr (UsrCod);
/***** Remove all notes of the user *****/
TL_DB_RemoveAllNotesUsr (UsrCod);