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

This commit is contained in:
acanas 2021-03-01 16:58:32 +01:00
parent 689fcce5d2
commit 50bad85404
4 changed files with 20 additions and 8 deletions

View File

@ -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.36.47 (2021-03-01)"
#define Log_PLATFORM_VERSION "SWAD 20.36.48 (2021-03-01)"
#define CSS_FILE "swad20.33.9.css"
#define JS_FILE "swad20.6.2.js"
/*
Version 20.36.48: Mar 01, 2021 Query moved to module swad_timeline_database. (305553 lines)
Version 20.36.47: Mar 01, 2021 Query moved to module swad_timeline_database. (305543 lines)
Version 20.36.46: Mar 01, 2021 Fixed bugs in timeline. (305529 lines)
Version 20.36.45: Mar 01, 2021 Queries moved to module swad_timeline_database. (305528 lines)

View File

@ -73,7 +73,7 @@ extern struct Globals Gbl;
static long TL_DB_GetMedCodFromPub (long PubCod,const char *DBTable);
/*****************************************************************************/
/********************* Get data of note using its code ***********************/
/********************* Get which users to show in timeline *******************/
/*****************************************************************************/
// Returns the number of rows got
@ -81,12 +81,26 @@ unsigned TL_DB_GetWho (MYSQL_RES **mysql_res)
{
/***** Get which users from database *****/
return (unsigned)
DB_QuerySELECT (mysql_res,"can not get timeline users",
DB_QuerySELECT (mysql_res,"can not get which timeline users",
"SELECT TimelineUsrs" // row[0]
" FROM usr_last WHERE UsrCod=%ld",
Gbl.Usrs.Me.UsrDat.UsrCod);
}
/*****************************************************************************/
/********************* Get which users to show in timeline *******************/
/*****************************************************************************/
void TL_DB_UpdateWho (Usr_Who_t Who)
{
/***** Update which users in database *****/
DB_QueryUPDATE ("can not update which timeline users",
"UPDATE usr_last SET TimelineUsrs=%u"
" WHERE UsrCod=%ld",
(unsigned) Who,
Gbl.Usrs.Me.UsrDat.UsrCod);
}
/*****************************************************************************/
/********************* Get data of note using its code ***********************/
/*****************************************************************************/

View File

@ -49,6 +49,7 @@
/****************************** Timeline from who ****************************/
unsigned TL_DB_GetWho (MYSQL_RES **mysql_res);
void TL_DB_UpdateWho (Usr_Who_t Who);
/*********************************** Notes ***********************************/
unsigned TL_DB_GetDataOfNoteByCod (long NotCod,MYSQL_RES **mysql_res);

View File

@ -164,11 +164,7 @@ void TL_Who_SaveWhoInDB (struct TL_Timeline *Timeline)
/***** Update which users in database *****/
// Who is stored in usr_last for next time I log in
DB_QueryUPDATE ("can not update timeline users in user's last data",
"UPDATE usr_last SET TimelineUsrs=%u"
" WHERE UsrCod=%ld",
(unsigned) Timeline->Who,
Gbl.Usrs.Me.UsrDat.UsrCod);
TL_DB_UpdateWho (Timeline->Who);
}
}