mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-16 05:34:12 +02:00
Version 16.155.2
This commit is contained in:
parent
1cbccc3b5f
commit
ed5640e1b1
|
@ -173,7 +173,7 @@ CREATE TABLE IF NOT EXISTS centres (
|
||||||
-- Table chat: stored number of users in each chat room (this table is not used now)
|
-- Table chat: stored number of users in each chat room (this table is not used now)
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS chat (
|
CREATE TABLE IF NOT EXISTS chat (
|
||||||
RoomCode VARCHAR(255) NOT NULL,
|
RoomCode VARCHAR(16) NOT NULL,
|
||||||
NumUsrs INT NOT NULL,
|
NumUsrs INT NOT NULL,
|
||||||
UNIQUE INDEX(RoomCode));
|
UNIQUE INDEX(RoomCode));
|
||||||
--
|
--
|
||||||
|
|
|
@ -204,13 +204,17 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.155.1 (2017-03-09)"
|
#define Log_PLATFORM_VERSION "SWAD 16.155.2 (2017-03-09)"
|
||||||
#define CSS_FILE "swad16.147.css"
|
#define CSS_FILE "swad16.147.css"
|
||||||
#define JS_FILE "swad16.144.js"
|
#define JS_FILE "swad16.144.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.155.2: Mar 09, 2017 Adjusting size of database fields. (216596 lines)
|
||||||
|
1 change necessary in database:
|
||||||
|
ALTER TABLE chat CHANGE COLUMN RoomCode RoomCode VARCHAR(16) NOT NULL;
|
||||||
|
|
||||||
Version 16.155.1: Mar 09, 2017 Adjusting size of database fields. (216593 lines)
|
Version 16.155.1: Mar 09, 2017 Adjusting size of database fields. (216593 lines)
|
||||||
2 changes necessary in database:
|
2 changes necessary in database:
|
||||||
ALTER TABLE centres CHANGE COLUMN ShortName ShortName VARCHAR(511) COLLATE latin1_spanish_ci NOT NULL;
|
ALTER TABLE centres CHANGE COLUMN ShortName ShortName VARCHAR(511) COLLATE latin1_spanish_ci NOT NULL;
|
||||||
|
|
|
@ -51,8 +51,8 @@ extern struct Globals Gbl;
|
||||||
|
|
||||||
#define Cht_CHAT_MAX_LEVELS 3
|
#define Cht_CHAT_MAX_LEVELS 3
|
||||||
|
|
||||||
#define Cht_MAX_CHARS_ROOM_CODE 16 // Maximum number of chars of the code of a chat room
|
#define Cht_MAX_CHARS_ROOM_CODE 16 // 16, maximum number of chars of the code of a chat room
|
||||||
#define Cht_MAX_BYTES_ROOM_CODE Cht_MAX_CHARS_ROOM_CODE
|
#define Cht_MAX_BYTES_ROOM_CODE Cht_MAX_CHARS_ROOM_CODE // 16
|
||||||
|
|
||||||
#define Cht_MAX_CHARS_ROOM_SHRT_NAME (128 - 1) // 127, maximum number of chars of the short name of a chat room
|
#define Cht_MAX_CHARS_ROOM_SHRT_NAME (128 - 1) // 127, maximum number of chars of the short name of a chat room
|
||||||
#define Cht_MAX_BYTES_ROOM_SHRT_NAME ((Cht_MAX_CHARS_ROOM_SHRT_NAME + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 2047
|
#define Cht_MAX_BYTES_ROOM_SHRT_NAME ((Cht_MAX_CHARS_ROOM_SHRT_NAME + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 2047
|
||||||
|
@ -244,7 +244,7 @@ void Cht_ShowListOfChatRoomsWithUsrs (void)
|
||||||
extern const char *Txt_Rooms_with_users;
|
extern const char *Txt_Rooms_with_users;
|
||||||
extern const char *Txt_CHAT_Room_code;
|
extern const char *Txt_CHAT_Room_code;
|
||||||
extern const char *Txt_No_of_users;
|
extern const char *Txt_No_of_users;
|
||||||
char Query[512];
|
char Query[256];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned long NumRow,NumRows;
|
unsigned long NumRow,NumRows;
|
||||||
|
@ -350,7 +350,7 @@ void Cht_WriteParamsRoomCodeAndNames (const char *RoomCode,const char *RoomShrtN
|
||||||
|
|
||||||
static unsigned Cht_GetNumUsrsInChatRoom (const char *RoomCode)
|
static unsigned Cht_GetNumUsrsInChatRoom (const char *RoomCode)
|
||||||
{
|
{
|
||||||
char Query[512];
|
char Query[128 + Cht_MAX_BYTES_ROOM_CODE];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned NumUsrs = 0;
|
unsigned NumUsrs = 0;
|
||||||
|
|
|
@ -443,18 +443,18 @@ mysql> DESCRIBE centres;
|
||||||
/***** Table chat *****/
|
/***** Table chat *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE chat;
|
mysql> DESCRIBE chat;
|
||||||
+----------+--------------+------+-----+---------+-------+
|
+----------+-------------+------+-----+---------+-------+
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+----------+--------------+------+-----+---------+-------+
|
+----------+-------------+------+-----+---------+-------+
|
||||||
| RoomCode | varchar(255) | NO | PRI | NULL | |
|
| RoomCode | varchar(16) | NO | PRI | NULL | |
|
||||||
| NumUsrs | int(11) | NO | | NULL | |
|
| NumUsrs | int(11) | NO | | NULL | |
|
||||||
+----------+--------------+------+-----+---------+-------+
|
+----------+-------------+------+-----+---------+-------+
|
||||||
2 rows in set (0.00 sec)
|
2 rows in set (0,00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS chat ("\
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS chat ("\
|
||||||
"RoomCode VARCHAR(255) NOT NULL,"
|
"RoomCode VARCHAR(16) NOT NULL," // Cht_MAX_BYTES_ROOM_CODE
|
||||||
"NumUsrs INT NOT NULL,"
|
"NumUsrs INT NOT NULL,"
|
||||||
"UNIQUE INDEX(RoomCode))");
|
"UNIQUE INDEX(RoomCode))");
|
||||||
|
|
||||||
/***** Table clicks_without_photo *****/
|
/***** Table clicks_without_photo *****/
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user