Version 20.66.2: Apr 22, 2021 Clicks-without-photo database table renamed.

This commit is contained in:
acanas 2021-04-22 14:35:54 +02:00
parent 79f5581860
commit 28e67f1f9a
3 changed files with 25 additions and 21 deletions

View File

@ -600,13 +600,17 @@ TODO: Salvador Romero Cort
TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria.
*/
#define Log_PLATFORM_VERSION "SWAD 20.66.1 (2021-04-17)"
#define Log_PLATFORM_VERSION "SWAD 20.66.2 (2021-04-22)"
#define CSS_FILE "swad20.45.css"
#define JS_FILE "swad20.6.2.js"
/*
TODO: Rename CENTRE to CENTER in help wiki.
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
Version 20.66.2: Apr 22, 2021 Clicks-without-photo database table renamed. (309126 lines)
1 change necessary in database:
RENAME TABLE pho_clicks_without_photo TO usr_clicks_without_photo;
Version 20.66.1: Apr 17, 2021 Code refactoring in database deletes. (309123 lines)
Version 20.66: Apr 17, 2021 Code refactoring in database updates. (308972 lines)
Version 20.65.1: Apr 17, 2021 Code refactoring in database replaces. (308677 lines)

View File

@ -2369,22 +2369,6 @@ mysql> DESCRIBE ntf_notifications;
"INDEX(CrsCod),"
"INDEX(TimeNotif))");
/***** Table pho_clicks_without_photo *****/
/*
mysql> DESCRIBE pho_clicks_without_photo;
+-----------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------+------+-----+---------+-------+
| UsrCod | int(11) | NO | PRI | NULL | |
| NumClicks | int(11) | NO | | NULL | |
+-----------+---------+------+-----+---------+-------+
2 rows in set (0.00 sec)
*/
DB_CreateTable ("CREATE TABLE IF NOT EXISTS pho_clicks_without_photo ("
"UsrCod INT NOT NULL,"
"NumClicks INT NOT NULL,"
"UNIQUE INDEX(UsrCod))");
/***** Table plc_places *****/
/*
mysql> DESCRIBE plc_places;
@ -3336,6 +3320,22 @@ mysql> DESCRIBE usr_birthdays_today;
"UNIQUE INDEX(UsrCod),"
"INDEX(Today))");
/***** Table usr_clicks_without_photo *****/
/*
mysql> DESCRIBE usr_clicks_without_photo;
+-----------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------+------+-----+---------+-------+
| UsrCod | int(11) | NO | PRI | NULL | |
| NumClicks | int(11) | NO | | NULL | |
+-----------+---------+------+-----+---------+-------+
2 rows in set (0.00 sec)
*/
DB_CreateTable ("CREATE TABLE IF NOT EXISTS usr_clicks_without_photo ("
"UsrCod INT NOT NULL,"
"NumClicks INT NOT NULL,"
"UNIQUE INDEX(UsrCod))");
/***** Table usr_connected *****/
/*
mysql> DESCRIBE usr_connected;

View File

@ -932,7 +932,7 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
if (DB_QuerySELECT (&mysql_res,"can not get number of clicks"
" without photo",
"SELECT NumClicks" // row[0]
" FROM pho_clicks_without_photo"
" FROM usr_clicks_without_photo"
" WHERE UsrCod=%ld",
Gbl.Usrs.Me.UsrDat.UsrCod)) // The user exists ==> update number of clicks without photo
{
@ -944,7 +944,7 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
if (NumClicks <= Pho_MAX_CLICKS_WITHOUT_PHOTO)
{
DB_QueryUPDATE ("can not update number of clicks without photo",
"UPDATE pho_clicks_without_photo"
"UPDATE usr_clicks_without_photo"
" SET NumClicks=NumClicks+1"
" WHERE UsrCod=%ld",
Gbl.Usrs.Me.UsrDat.UsrCod);
@ -955,7 +955,7 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
{
/* Add the user, with one access */
DB_QueryINSERT ("can not create number of clicks without photo",
"INSERT INTO pho_clicks_without_photo"
"INSERT INTO usr_clicks_without_photo"
" (UsrCod,NumClicks)"
" VALUES"
" (%ld,1)",
@ -977,7 +977,7 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
void Pho_RemoveUsrFromTableClicksWithoutPhoto (long UsrCod)
{
DB_QueryDELETE ("can not remove a user from the list of users without photo",
"DELETE FROM pho_clicks_without_photo"
"DELETE FROM usr_clicks_without_photo"
" WHERE UsrCod=%ld",
UsrCod);
}