mirror of https://github.com/acanas/swad-core.git
Version 20.50.7: Mar 17, 2021 Chat database table renamed.
This commit is contained in:
parent
ce8a3aa9c9
commit
3cee1db7c1
|
@ -137,9 +137,9 @@ CREATE TABLE IF NOT EXISTS bld_buildings (
|
|||
UNIQUE INDEX(BldCod),
|
||||
INDEX(CtrCod));
|
||||
--
|
||||
-- Table chat: stores number of users in each chat room (this table is not used now)
|
||||
-- Table cht_rooms: stores number of users in each chat room (this table is not used now)
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS chat (
|
||||
CREATE TABLE IF NOT EXISTS cht_rooms (
|
||||
RoomCode VARCHAR(16) NOT NULL,
|
||||
NumUsrs INT NOT NULL,
|
||||
UNIQUE INDEX(RoomCode));
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.50.6 (2021-03-17)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.50.7 (2021-03-17)"
|
||||
#define CSS_FILE "swad20.45.css"
|
||||
#define JS_FILE "swad20.6.2.js"
|
||||
/*
|
||||
TODO: Rename CENTRE to CENTER in help wiki.
|
||||
|
||||
Version 20.50.7: Mar 17, 2021 Chat database table renamed. (307318 lines)
|
||||
1 change necessary in database:
|
||||
RENAME TABLE chat TO cht_rooms;
|
||||
|
||||
Version 20.50.6: Mar 17, 2021 Buildings database table renamed. (307310 lines)
|
||||
1 change necessary in database:
|
||||
RENAME TABLE buildings TO bld_buildings;
|
||||
|
|
11
swad_chat.c
11
swad_chat.c
|
@ -244,9 +244,12 @@ void Cht_ShowListOfChatRoomsWithUsrs (void)
|
|||
/***** Get chat rooms with connected users from database *****/
|
||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get chat rooms"
|
||||
" with connected users",
|
||||
"SELECT RoomCode,NumUsrs FROM chat"
|
||||
"SELECT RoomCode," // row[0]
|
||||
"NumUsrs" // row[1]
|
||||
" FROM cht_rooms"
|
||||
" WHERE NumUsrs>0"
|
||||
" ORDER BY NumUsrs DESC,RoomCode");
|
||||
" ORDER BY NumUsrs DESC,"
|
||||
"RoomCode");
|
||||
if (NumRows > 0) // If not empty chat rooms found
|
||||
{
|
||||
/***** Begin box and table *****/
|
||||
|
@ -353,7 +356,9 @@ static unsigned Cht_GetNumUsrsInChatRoom (const char *RoomCode)
|
|||
/***** Get number of users connected to chat rooms from database *****/
|
||||
if (DB_QuerySELECT (&mysql_res,"can not get number of users"
|
||||
" connected to a chat room",
|
||||
"SELECT NumUsrs FROM chat WHERE RoomCode='%s'",
|
||||
"SELECT NumUsrs"
|
||||
" FROM cht_rooms"
|
||||
" WHERE RoomCode='%s'",
|
||||
RoomCode))
|
||||
{
|
||||
/* Get number of users connected to the chat room */
|
||||
|
|
|
@ -381,9 +381,9 @@ mysql> DESCRIBE bld_buildings;
|
|||
"UNIQUE INDEX(BldCod),"
|
||||
"INDEX(CtrCod))");
|
||||
|
||||
/***** Table chat *****/
|
||||
/***** Table cht_rooms *****/
|
||||
/*
|
||||
mysql> DESCRIBE chat;
|
||||
mysql> DESCRIBE cht_rooms;
|
||||
+----------+-------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+----------+-------------+------+-----+---------+-------+
|
||||
|
|
Loading…
Reference in New Issue