mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 22:35:28 +02:00
Version 20.50.8: Mar 17, 2021 Clicks-without-photo database table renamed.
This commit is contained in:
parent
3cee1db7c1
commit
b935933e94
14
sql/swad.sql
14
sql/swad.sql
|
@ -144,13 +144,6 @@ CREATE TABLE IF NOT EXISTS cht_rooms (
|
||||||
NumUsrs INT NOT NULL,
|
NumUsrs INT NOT NULL,
|
||||||
UNIQUE INDEX(RoomCode));
|
UNIQUE INDEX(RoomCode));
|
||||||
--
|
--
|
||||||
-- Table clicks_without_photo: stores the number of clicks that remains to each user before being required to submit his/her photo
|
|
||||||
--
|
|
||||||
CREATE TABLE IF NOT EXISTS clicks_without_photo (
|
|
||||||
UsrCod INT NOT NULL,
|
|
||||||
NumClicks INT NOT NULL,
|
|
||||||
UNIQUE INDEX(UsrCod));
|
|
||||||
--
|
|
||||||
-- Table clipboard: clipboard (paths used to copy-paste folders and files)
|
-- Table clipboard: clipboard (paths used to copy-paste folders and files)
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS clipboard (
|
CREATE TABLE IF NOT EXISTS clipboard (
|
||||||
|
@ -1185,6 +1178,13 @@ CREATE TABLE IF NOT EXISTS pending_passwd (
|
||||||
DateAndTime DATETIME NOT NULL,
|
DateAndTime DATETIME NOT NULL,
|
||||||
PRIMARY KEY(UsrCod));
|
PRIMARY KEY(UsrCod));
|
||||||
--
|
--
|
||||||
|
-- Table pho_clicks_without_photo: stores the number of clicks that remains to each user before being required to submit his/her photo
|
||||||
|
--
|
||||||
|
CREATE TABLE IF NOT EXISTS pho_clicks_without_photo (
|
||||||
|
UsrCod INT NOT NULL,
|
||||||
|
NumClicks INT NOT NULL,
|
||||||
|
UNIQUE INDEX(UsrCod));
|
||||||
|
--
|
||||||
-- Table places: stores the places associated to each institution, used in holidays
|
-- Table places: stores the places associated to each institution, used in holidays
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS places (
|
CREATE TABLE IF NOT EXISTS places (
|
||||||
|
|
|
@ -600,12 +600,16 @@ 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.
|
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.50.7 (2021-03-17)"
|
#define Log_PLATFORM_VERSION "SWAD 20.50.8 (2021-03-17)"
|
||||||
#define CSS_FILE "swad20.45.css"
|
#define CSS_FILE "swad20.45.css"
|
||||||
#define JS_FILE "swad20.6.2.js"
|
#define JS_FILE "swad20.6.2.js"
|
||||||
/*
|
/*
|
||||||
TODO: Rename CENTRE to CENTER in help wiki.
|
TODO: Rename CENTRE to CENTER in help wiki.
|
||||||
|
|
||||||
|
Version 20.50.8: Mar 17, 2021 Clicks-without-photo database table renamed. (307324 lines)
|
||||||
|
1 change necessary in database:
|
||||||
|
RENAME TABLE clicks_without_photo TO pho_clicks_without_photo;
|
||||||
|
|
||||||
Version 20.50.7: Mar 17, 2021 Chat database table renamed. (307318 lines)
|
Version 20.50.7: Mar 17, 2021 Chat database table renamed. (307318 lines)
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
RENAME TABLE chat TO cht_rooms;
|
RENAME TABLE chat TO cht_rooms;
|
||||||
|
|
|
@ -397,22 +397,6 @@ mysql> DESCRIBE cht_rooms;
|
||||||
"NumUsrs INT NOT NULL,"
|
"NumUsrs INT NOT NULL,"
|
||||||
"UNIQUE INDEX(RoomCode))");
|
"UNIQUE INDEX(RoomCode))");
|
||||||
|
|
||||||
/***** Table clicks_without_photo *****/
|
|
||||||
/*
|
|
||||||
mysql> DESCRIBE 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 clicks_without_photo ("
|
|
||||||
"UsrCod INT NOT NULL,"
|
|
||||||
"NumClicks INT NOT NULL,"
|
|
||||||
"UNIQUE INDEX(UsrCod))");
|
|
||||||
|
|
||||||
/***** Table clipboard *****/
|
/***** Table clipboard *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE clipboard;
|
mysql> DESCRIBE clipboard;
|
||||||
|
@ -2472,6 +2456,22 @@ mysql> DESCRIBE pending_passwd;
|
||||||
"DateAndTime DATETIME NOT NULL,"
|
"DateAndTime DATETIME NOT NULL,"
|
||||||
"PRIMARY KEY (UsrCod))");
|
"PRIMARY KEY (UsrCod))");
|
||||||
|
|
||||||
|
/***** 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 places *****/
|
/***** Table places *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE places;
|
mysql> DESCRIBE places;
|
||||||
|
|
13
swad_photo.c
13
swad_photo.c
|
@ -932,7 +932,8 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
|
||||||
/***** Get number of clicks without photo from database *****/
|
/***** Get number of clicks without photo from database *****/
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get number of clicks"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get number of clicks"
|
||||||
" without photo",
|
" without photo",
|
||||||
"SELECT NumClicks FROM clicks_without_photo"
|
"SELECT NumClicks"
|
||||||
|
" FROM pho_clicks_without_photo"
|
||||||
" WHERE UsrCod=%ld",
|
" WHERE UsrCod=%ld",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
|
||||||
|
@ -947,8 +948,9 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
|
||||||
if (NumClicks <= Pho_MAX_CLICKS_WITHOUT_PHOTO)
|
if (NumClicks <= Pho_MAX_CLICKS_WITHOUT_PHOTO)
|
||||||
{
|
{
|
||||||
DB_QueryUPDATE ("can not update number of clicks without photo",
|
DB_QueryUPDATE ("can not update number of clicks without photo",
|
||||||
"UPDATE clicks_without_photo"
|
"UPDATE pho_clicks_without_photo"
|
||||||
" SET NumClicks=NumClicks+1 WHERE UsrCod=%ld",
|
" SET NumClicks=NumClicks+1"
|
||||||
|
" WHERE UsrCod=%ld",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
NumClicks++;
|
NumClicks++;
|
||||||
}
|
}
|
||||||
|
@ -957,7 +959,7 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
|
||||||
{
|
{
|
||||||
/* Add the user, with one access */
|
/* Add the user, with one access */
|
||||||
DB_QueryINSERT ("can not create number of clicks without photo",
|
DB_QueryINSERT ("can not create number of clicks without photo",
|
||||||
"INSERT INTO clicks_without_photo"
|
"INSERT INTO pho_clicks_without_photo"
|
||||||
" (UsrCod,NumClicks)"
|
" (UsrCod,NumClicks)"
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" (%ld,1)",
|
" (%ld,1)",
|
||||||
|
@ -979,7 +981,8 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
|
||||||
void Pho_RemoveUsrFromTableClicksWithoutPhoto (long UsrCod)
|
void Pho_RemoveUsrFromTableClicksWithoutPhoto (long UsrCod)
|
||||||
{
|
{
|
||||||
DB_QueryDELETE ("can not remove a user from the list of users without photo",
|
DB_QueryDELETE ("can not remove a user from the list of users without photo",
|
||||||
"DELETE FROM clicks_without_photo WHERE UsrCod=%ld",
|
"DELETE FROM pho_clicks_without_photo"
|
||||||
|
" WHERE UsrCod=%ld",
|
||||||
UsrCod);
|
UsrCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user