mirror of https://github.com/acanas/swad-core.git
Version 15.256.1
This commit is contained in:
parent
72e133442f
commit
da3750369e
12
sql/swad.sql
12
sql/swad.sql
|
@ -739,9 +739,9 @@ CREATE TABLE IF NOT EXISTS msg_content (
|
||||||
MsgCod INT NOT NULL AUTO_INCREMENT,
|
MsgCod INT NOT NULL AUTO_INCREMENT,
|
||||||
Subject TEXT NOT NULL,
|
Subject TEXT NOT NULL,
|
||||||
Content LONGTEXT NOT NULL,
|
Content LONGTEXT NOT NULL,
|
||||||
ImageName VARCHAR(43) NOT NULL,
|
ImageName VARCHAR(43) NOT NULL DEFAULT '',
|
||||||
ImageTitle VARCHAR(255) NOT NULL,
|
ImageTitle VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
ImageURL VARCHAR(255) NOT NULL,
|
ImageURL VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
UNIQUE INDEX(MsgCod),
|
UNIQUE INDEX(MsgCod),
|
||||||
FULLTEXT(Subject,Content)) ENGINE = MYISAM;
|
FULLTEXT(Subject,Content)) ENGINE = MYISAM;
|
||||||
--
|
--
|
||||||
|
@ -751,9 +751,9 @@ CREATE TABLE IF NOT EXISTS msg_content_deleted (
|
||||||
MsgCod INT NOT NULL,
|
MsgCod INT NOT NULL,
|
||||||
Subject TEXT NOT NULL,
|
Subject TEXT NOT NULL,
|
||||||
Content LONGTEXT NOT NULL,
|
Content LONGTEXT NOT NULL,
|
||||||
ImageName VARCHAR(43) NOT NULL,
|
ImageName VARCHAR(43) NOT NULL DEFAULT '',
|
||||||
ImageTitle VARCHAR(255) NOT NULL,
|
ImageTitle VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
ImageURL VARCHAR(255) NOT NULL,
|
ImageURL VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
UNIQUE INDEX(MsgCod),
|
UNIQUE INDEX(MsgCod),
|
||||||
FULLTEXT(Subject,Content)) ENGINE = MYISAM;
|
FULLTEXT(Subject,Content)) ENGINE = MYISAM;
|
||||||
--
|
--
|
||||||
|
|
|
@ -139,13 +139,23 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.256 (2016-09-19)"
|
#define Log_PLATFORM_VERSION "SWAD 15.256.1 (2016-09-19)"
|
||||||
#define CSS_FILE "swad15.229.css"
|
#define CSS_FILE "swad15.229.css"
|
||||||
#define JS_FILE "swad15.238.1.js"
|
#define JS_FILE "swad15.238.1.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 15.256.1: Sep 19, 2016 Fixed bug in web service while sending a message.
|
||||||
|
Added default values in some database fields. (204741 lines)
|
||||||
|
6 changes necessary in database:
|
||||||
|
ALTER TABLE msg_content CHANGE COLUMN ImageName ImageName VARCHAR(43) NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE msg_content CHANGE COLUMN ImageTitle ImageTitle VARCHAR(255) NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE msg_content CHANGE COLUMN ImageURL ImageURL VARCHAR(255) NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE msg_content_deleted CHANGE COLUMN ImageName ImageName VARCHAR(43) NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE msg_content_deleted CHANGE COLUMN ImageTitle ImageTitle VARCHAR(255) NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE msg_content_deleted CHANGE COLUMN ImageURL ImageURL VARCHAR(255) NOT NULL DEFAULT '';
|
||||||
|
|
||||||
Version 15.256: Sep 19, 2016 PRADO web service removed from swad.ugr.es. (204722 lines)
|
Version 15.256: Sep 19, 2016 PRADO web service removed from swad.ugr.es. (204722 lines)
|
||||||
Version 15.255: Sep 18, 2016 Migration to new server. (204804 lines)
|
Version 15.255: Sep 18, 2016 Migration to new server. (204804 lines)
|
||||||
Version 15.254.2: Sep 13, 2016 Fixed bug while getting summary and content of a social note related to a new file. (204706 lines)
|
Version 15.254.2: Sep 13, 2016 Fixed bug while getting summary and content of a social note related to a new file. (204706 lines)
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
/** Uncomment one of the following installations of SWAD or create your own **/
|
/** Uncomment one of the following installations of SWAD or create your own **/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
//#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||||
//#define OPENSWAD_ORG // Comment this line if not applicable
|
//#define OPENSWAD_ORG // Comment this line if not applicable
|
||||||
//#define SWAD_UGR_ES // Comment this line if not applicable
|
#define SWAD_UGR_ES // Comment this line if not applicable
|
||||||
//#define SWADBERRY_UGR_ES // Comment this line if not applicable
|
//#define SWADBERRY_UGR_ES // Comment this line if not applicable
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -1583,44 +1583,43 @@ mysql> DESCRIBE msg_content;
|
||||||
| MsgCod | int(11) | NO | PRI | NULL | auto_increment |
|
| MsgCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||||
| Subject | text | NO | MUL | NULL | |
|
| Subject | text | NO | MUL | NULL | |
|
||||||
| Content | longtext | NO | | NULL | |
|
| Content | longtext | NO | | NULL | |
|
||||||
| ImageName | varchar(43) | NO | | NULL | |
|
| ImageName | varchar(43) | NO | | | |
|
||||||
| ImageTitle | varchar(255) | NO | | NULL | |
|
| ImageTitle | varchar(255) | NO | | | |
|
||||||
| ImageURL | varchar(255) | NO | | NULL | |
|
| ImageURL | varchar(255) | NO | | | |
|
||||||
+------------+--------------+------+-----+---------+----------------+
|
+------------+--------------+------+-----+---------+----------------+
|
||||||
6 rows in set (0.00 sec)
|
6 rows in set (0,00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS msg_content ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS msg_content ("
|
||||||
"MsgCod INT NOT NULL AUTO_INCREMENT,"
|
"MsgCod INT NOT NULL AUTO_INCREMENT,"
|
||||||
"Subject TEXT NOT NULL,"
|
"Subject TEXT NOT NULL,"
|
||||||
"Content LONGTEXT NOT NULL,"
|
"Content LONGTEXT NOT NULL,"
|
||||||
"ImageName VARCHAR(43) NOT NULL,"
|
"ImageName VARCHAR(43) NOT NULL DEFAULT '',"
|
||||||
"ImageTitle VARCHAR(255) NOT NULL,"
|
"ImageTitle VARCHAR(255) NOT NULL DEFAULT '',"
|
||||||
"ImageURL VARCHAR(255) NOT NULL,"
|
"ImageURL VARCHAR(255) NOT NULL DEFAULT '',"
|
||||||
"UNIQUE INDEX(MsgCod),"
|
"UNIQUE INDEX(MsgCod),"
|
||||||
"FULLTEXT(Subject,Content)) ENGINE = MYISAM;");
|
"FULLTEXT(Subject,Content)) ENGINE = MYISAM;");
|
||||||
|
|
||||||
/***** Table msg_content_deleted *****/
|
/***** Table msg_content_deleted *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE msg_content_deleted;
|
mysql> DESCRIBE msg_content_deleted; +------------+--------------+------+-----+---------+-------+
|
||||||
+------------+--------------+------+-----+---------+-------+
|
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+------------+--------------+------+-----+---------+-------+
|
+------------+--------------+------+-----+---------+-------+
|
||||||
| MsgCod | int(11) | NO | PRI | NULL | |
|
| MsgCod | int(11) | NO | PRI | NULL | |
|
||||||
| Subject | text | NO | MUL | NULL | |
|
| Subject | text | NO | MUL | NULL | |
|
||||||
| Content | longtext | NO | | NULL | |
|
| Content | longtext | NO | | NULL | |
|
||||||
| ImageName | varchar(43) | NO | | NULL | |
|
| ImageName | varchar(43) | NO | | | |
|
||||||
| ImageTitle | varchar(255) | NO | | NULL | |
|
| ImageTitle | varchar(255) | NO | | | |
|
||||||
| ImageURL | varchar(255) | NO | | NULL | |
|
| ImageURL | varchar(255) | NO | | | |
|
||||||
+------------+--------------+------+-----+---------+-------+
|
+------------+--------------+------+-----+---------+-------+
|
||||||
6 rows in set (0.00 sec)
|
6 rows in set (0,00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS msg_content_deleted ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS msg_content_deleted ("
|
||||||
"MsgCod INT NOT NULL,"
|
"MsgCod INT NOT NULL,"
|
||||||
"Subject TEXT NOT NULL,"
|
"Subject TEXT NOT NULL,"
|
||||||
"Content LONGTEXT NOT NULL,"
|
"Content LONGTEXT NOT NULL,"
|
||||||
"ImageName VARCHAR(43) NOT NULL,"
|
"ImageName VARCHAR(43) NOT NULL DEFAULT '',"
|
||||||
"ImageTitle VARCHAR(255) NOT NULL,"
|
"ImageTitle VARCHAR(255) NOT NULL DEFAULT '',"
|
||||||
"ImageURL VARCHAR(255) NOT NULL,"
|
"ImageURL VARCHAR(255) NOT NULL DEFAULT '',"
|
||||||
"UNIQUE INDEX(MsgCod),"
|
"UNIQUE INDEX(MsgCod),"
|
||||||
"FULLTEXT(Subject,Content)) ENGINE = MYISAM;");
|
"FULLTEXT(Subject,Content)) ENGINE = MYISAM;");
|
||||||
|
|
||||||
|
|
|
@ -3307,8 +3307,15 @@ int swad__sendMessage (struct soap *soap,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************* Send a message to one user ************************/
|
/************************* Send a message to one user ************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
/*
|
||||||
static int Svc_SendMessageToUsr (long OriginalMsgCod,long SenderUsrCod,long ReplyUsrCod,long RecipientUsrCod,bool NotifyByEmail,const char *Subject,const char *Content)
|
Svc_SendMessageToUsr ((long) messageCode,
|
||||||
|
Gbl.Usrs.Me.UsrDat.UsrCod,ReplyUsrCod,Gbl.Usrs.Other.UsrDat.UsrCod,
|
||||||
|
NotifyByEmail,subject,body)) != SOAP_OK)
|
||||||
|
*/
|
||||||
|
static int Svc_SendMessageToUsr (long OriginalMsgCod,
|
||||||
|
long SenderUsrCod,long ReplyUsrCod,long RecipientUsrCod,
|
||||||
|
bool NotifyByEmail,
|
||||||
|
const char *Subject,const char *Content)
|
||||||
{
|
{
|
||||||
static bool MsgAlreadyInserted = false;
|
static bool MsgAlreadyInserted = false;
|
||||||
static long NewMsgCod;
|
static long NewMsgCod;
|
||||||
|
@ -3319,8 +3326,10 @@ static int Svc_SendMessageToUsr (long OriginalMsgCod,long SenderUsrCod,long Repl
|
||||||
{
|
{
|
||||||
/***** Insert message subject and body in the database *****/
|
/***** Insert message subject and body in the database *****/
|
||||||
/* Build query */
|
/* Build query */
|
||||||
sprintf (Query,"INSERT INTO msg_content (Subject,Content)"
|
sprintf (Query,"INSERT INTO msg_content"
|
||||||
" VALUES ('%s','%s')",Subject,Content);
|
" (Subject,Content,ImageName,ImageTitle,ImageURL)"
|
||||||
|
" VALUES ('%s','%s','','','')",
|
||||||
|
Subject,Content);
|
||||||
|
|
||||||
/* Get the code of the inserted item */
|
/* Get the code of the inserted item */
|
||||||
NewMsgCod = DB_QueryINSERTandReturnCode (Query,"can not create message");
|
NewMsgCod = DB_QueryINSERTandReturnCode (Query,"can not create message");
|
||||||
|
@ -3358,7 +3367,8 @@ static int Svc_SendMessageToUsr (long OriginalMsgCod,long SenderUsrCod,long Repl
|
||||||
if (RecipientUsrCod == ReplyUsrCod)
|
if (RecipientUsrCod == ReplyUsrCod)
|
||||||
{
|
{
|
||||||
/***** ...then update received message setting Replied field to true *****/
|
/***** ...then update received message setting Replied field to true *****/
|
||||||
sprintf (Query,"UPDATE msg_rcv SET Replied='Y' WHERE MsgCod='%ld' AND UsrCod='%ld'",
|
sprintf (Query,"UPDATE msg_rcv SET Replied='Y'"
|
||||||
|
" WHERE MsgCod='%ld' AND UsrCod='%ld'",
|
||||||
OriginalMsgCod,SenderUsrCod);
|
OriginalMsgCod,SenderUsrCod);
|
||||||
DB_QueryUPDATE (Query,"can not update a received message");
|
DB_QueryUPDATE (Query,"can not update a received message");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue