mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-13 12:14:06 +02:00
Version19.76.8
This commit is contained in:
parent
b3fb1e9be8
commit
be79861298
|
@ -1087,10 +1087,10 @@ CREATE TABLE IF NOT EXISTS sessions (
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS social_comments (
|
CREATE TABLE IF NOT EXISTS social_comments (
|
||||||
PubCod BIGINT NOT NULL,
|
PubCod BIGINT NOT NULL,
|
||||||
Content LONGTEXT NOT NULL,
|
Txt LONGTEXT NOT NULL,
|
||||||
MedCod INT NOT NULL DEFAULT -1,
|
MedCod INT NOT NULL DEFAULT -1,
|
||||||
UNIQUE INDEX(PubCod),
|
UNIQUE INDEX(PubCod),
|
||||||
FULLTEXT(Content),
|
FULLTEXT(Txt),
|
||||||
INDEX(MedCod)) ENGINE = MYISAM;
|
INDEX(MedCod)) ENGINE = MYISAM;
|
||||||
--
|
--
|
||||||
-- Table social_comments_fav: stores users who marked social comments as favourite
|
-- Table social_comments_fav: stores users who marked social comments as favourite
|
||||||
|
|
|
@ -490,7 +490,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.76.7 (2019-11-24)"
|
#define Log_PLATFORM_VERSION "SWAD 19.76.8 (2019-11-25)"
|
||||||
#define CSS_FILE "swad19.74.3.css"
|
#define CSS_FILE "swad19.74.3.css"
|
||||||
#define JS_FILE "swad19.70.js"
|
#define JS_FILE "swad19.70.js"
|
||||||
/*
|
/*
|
||||||
|
@ -498,6 +498,13 @@ ps2pdf source.ps destination.pdf
|
||||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||||
// TODO: En cada juego, poder listar los resultados en una tabla como la de resultados globales
|
// TODO: En cada juego, poder listar los resultados en una tabla como la de resultados globales
|
||||||
|
|
||||||
|
Version 19.76.8: Nov 25, 2019 Changes in database related to timeline. (246885 lines)
|
||||||
|
4 changes necessary in database:
|
||||||
|
ALTER TABLE social_comments CHANGE COLUMN Content Txt LONGTEXT NOT NULL,DROP FULLTEXT Content,ADD FULLTEXT (Txt);
|
||||||
|
ALTER TABLE social_comments DROP INDEX Content;
|
||||||
|
ALTER TABLE social_posts CHANGE COLUMN Content Txt LONGTEXT NOT NULL,DROP FULLTEXT Content,ADD FULLTEXT (Txt);
|
||||||
|
ALTER TABLE social_posts DROP INDEX Content;
|
||||||
|
|
||||||
Version 19.76.7: Nov 24, 2019 Code refactoring in timeline. (246879 lines)
|
Version 19.76.7: Nov 24, 2019 Code refactoring in timeline. (246879 lines)
|
||||||
Version 19.76.6: Nov 22, 2019 Code refactoring in forums and strings. (246845 lines)
|
Version 19.76.6: Nov 22, 2019 Code refactoring in forums and strings. (246845 lines)
|
||||||
Version 19.76.5: Nov 22, 2019 Code refactoring related to vectors. (246852 lines)
|
Version 19.76.5: Nov 22, 2019 Code refactoring related to vectors. (246852 lines)
|
||||||
|
@ -534,7 +541,7 @@ ps2pdf source.ps destination.pdf
|
||||||
Version 19.70.1: Nov 17, 2019 Converting links to buttons.
|
Version 19.70.1: Nov 17, 2019 Converting links to buttons.
|
||||||
Fixed bug in agenda. (247061 lines)
|
Fixed bug in agenda. (247061 lines)
|
||||||
Version 19.70: Nov 17, 2019 Hidden comments in timeline are loaded on request using AJAX. (247028 lines)
|
Version 19.70: Nov 17, 2019 Hidden comments in timeline are loaded on request using AJAX. (247028 lines)
|
||||||
1 change necessary in database:
|
2 changes necessary in database:
|
||||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1806','es','N','Ver comentarios ocultos (global)');
|
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1806','es','N','Ver comentarios ocultos (global)');
|
||||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1807','es','N','Ver comentarios ocultos (usuario)');
|
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1807','es','N','Ver comentarios ocultos (usuario)');
|
||||||
|
|
||||||
|
|
|
@ -2310,21 +2310,21 @@ mysql> DESCRIBE sessions;
|
||||||
/***** Table social_comments *****/
|
/***** Table social_comments *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE social_comments;
|
mysql> DESCRIBE social_comments;
|
||||||
+---------+------------+------+-----+---------+-------+
|
+--------+------------+------+-----+---------+-------+
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+---------+------------+------+-----+---------+-------+
|
+--------+------------+------+-----+---------+-------+
|
||||||
| PubCod | bigint(20) | NO | PRI | NULL | |
|
| PubCod | bigint(20) | NO | PRI | NULL | |
|
||||||
| Content | longtext | NO | MUL | NULL | |
|
| Txt | longtext | NO | MUL | NULL | |
|
||||||
| MedCod | int(11) | NO | MUL | -1 | |
|
| MedCod | int(11) | NO | MUL | -1 | |
|
||||||
+---------+------------+------+-----+---------+-------+
|
+--------+------------+------+-----+---------+-------+
|
||||||
3 rows in set (0.00 sec)
|
3 rows in set (0.00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS social_comments ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS social_comments ("
|
||||||
"PubCod BIGINT NOT NULL,"
|
"PubCod BIGINT NOT NULL,"
|
||||||
"Content LONGTEXT NOT NULL," // TODO: Rename as Txt
|
"Content Txt NOT NULL,"
|
||||||
"MedCod INT NOT NULL DEFAULT -1,"
|
"MedCod INT NOT NULL DEFAULT -1,"
|
||||||
"UNIQUE INDEX(PubCod),"
|
"UNIQUE INDEX(PubCod),"
|
||||||
"FULLTEXT(Content)," // TODO: Rename as Txt
|
"FULLTEXT(Txt),"
|
||||||
"INDEX(MedCod)) ENGINE = MYISAM;");
|
"INDEX(MedCod)) ENGINE = MYISAM;");
|
||||||
|
|
||||||
/***** Table social_comments_fav *****/
|
/***** Table social_comments_fav *****/
|
||||||
|
@ -2403,21 +2403,21 @@ mysql> DESCRIBE social_notes_fav;
|
||||||
/***** Table social_posts *****/
|
/***** Table social_posts *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE social_posts;
|
mysql> DESCRIBE social_posts;
|
||||||
+---------+----------+------+-----+---------+----------------+
|
+--------+----------+------+-----+---------+----------------+
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+---------+----------+------+-----+---------+----------------+
|
+--------+----------+------+-----+---------+----------------+
|
||||||
| PstCod | int(11) | NO | PRI | NULL | auto_increment |
|
| PstCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||||
| Content | longtext | NO | MUL | NULL | |
|
| Txt | longtext | NO | MUL | NULL | |
|
||||||
| MedCod | int(11) | NO | MUL | -1 | |
|
| MedCod | int(11) | NO | MUL | -1 | |
|
||||||
+---------+----------+------+-----+---------+----------------+
|
+--------+----------+------+-----+---------+----------------+
|
||||||
3 rows in set (0.01 sec)
|
3 rows in set (0.00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS social_posts ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS social_posts ("
|
||||||
"PubCod INT NOT NULL AUTO_INCREMENT,"
|
"PubCod INT NOT NULL AUTO_INCREMENT,"
|
||||||
"Content LONGTEXT NOT NULL," // TODO: Rename as Txt
|
"Txt LONGTEXT NOT NULL,"
|
||||||
"MedCod INT NOT NULL DEFAULT -1,"
|
"MedCod INT NOT NULL DEFAULT -1,"
|
||||||
"UNIQUE INDEX(PubCod),"
|
"UNIQUE INDEX(PubCod),"
|
||||||
"FULLTEXT(Content)," // TODO: Rename as Txt
|
"FULLTEXT(Txt),"
|
||||||
"INDEX(MedCod)) ENGINE = MYISAM;");
|
"INDEX(MedCod)) ENGINE = MYISAM;");
|
||||||
|
|
||||||
/***** Table social_pubs *****/
|
/***** Table social_pubs *****/
|
||||||
|
|
|
@ -1847,7 +1847,7 @@ static void TL_GetAndWritePost (long PstCod)
|
||||||
/***** Get post from database *****/
|
/***** Get post from database *****/
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get the content"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get the content"
|
||||||
" of a post",
|
" of a post",
|
||||||
"SELECT Content," // row[0] // TODO: Rename as Txt
|
"SELECT Txt," // row[0]
|
||||||
"MedCod" // row[1]
|
"MedCod" // row[1]
|
||||||
" FROM social_posts"
|
" FROM social_posts"
|
||||||
" WHERE PstCod=%ld",
|
" WHERE PstCod=%ld",
|
||||||
|
@ -2459,7 +2459,7 @@ static long TL_ReceivePost (void)
|
||||||
PstCod =
|
PstCod =
|
||||||
DB_QueryINSERTandReturnCode ("can not create post",
|
DB_QueryINSERTandReturnCode ("can not create post",
|
||||||
"INSERT INTO social_posts"
|
"INSERT INTO social_posts"
|
||||||
" (Content,MedCod)" // TODO: Rename Content as Txt
|
" (Txt,MedCod)"
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" ('%s',%ld)",
|
" ('%s',%ld)",
|
||||||
Content.Txt,
|
Content.Txt,
|
||||||
|
@ -2608,7 +2608,7 @@ static void TL_WriteCommentsInNote (const struct TL_Note *SocNot,
|
||||||
"social_pubs.NotCod," // row[2]
|
"social_pubs.NotCod," // row[2]
|
||||||
"UNIX_TIMESTAMP("
|
"UNIX_TIMESTAMP("
|
||||||
"social_pubs.TimePublish)," // row[3]
|
"social_pubs.TimePublish)," // row[3]
|
||||||
"social_comments.Content," // row[4] // TODO: Rename as Txt
|
"social_comments.Txt," // row[4]
|
||||||
"social_comments.MedCod" // row[5]
|
"social_comments.MedCod" // row[5]
|
||||||
" FROM social_pubs,social_comments"
|
" FROM social_pubs,social_comments"
|
||||||
" WHERE social_pubs.NotCod=%ld"
|
" WHERE social_pubs.NotCod=%ld"
|
||||||
|
@ -2820,7 +2820,7 @@ static unsigned TL_WriteHiddenComments (long NotCod,
|
||||||
"social_pubs.NotCod," // row[2]
|
"social_pubs.NotCod," // row[2]
|
||||||
"UNIX_TIMESTAMP("
|
"UNIX_TIMESTAMP("
|
||||||
"social_pubs.TimePublish)," // row[3]
|
"social_pubs.TimePublish)," // row[3]
|
||||||
"social_comments.Content," // row[4] // TODO: Rename as Txt
|
"social_comments.Txt," // row[4]
|
||||||
"social_comments.MedCod" // row[5]
|
"social_comments.MedCod" // row[5]
|
||||||
" FROM social_pubs,social_comments"
|
" FROM social_pubs,social_comments"
|
||||||
" WHERE social_pubs.NotCod=%ld"
|
" WHERE social_pubs.NotCod=%ld"
|
||||||
|
@ -3394,7 +3394,7 @@ static long TL_ReceiveComment (void)
|
||||||
/* Insert comment content in the database */
|
/* Insert comment content in the database */
|
||||||
DB_QueryINSERT ("can not store comment content",
|
DB_QueryINSERT ("can not store comment content",
|
||||||
"INSERT INTO social_comments"
|
"INSERT INTO social_comments"
|
||||||
" (PubCod,Content,MedCod)" // TODO: Rename Content as Txt
|
" (PubCod,Txt,MedCod)"
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" (%ld,'%s',%ld)",
|
" (%ld,'%s',%ld)",
|
||||||
SocPub.PubCod,
|
SocPub.PubCod,
|
||||||
|
@ -4934,7 +4934,7 @@ static void TL_GetDataOfCommByCod (struct TL_Comment *SocCom)
|
||||||
"social_pubs.PublisherCod," // row[1]
|
"social_pubs.PublisherCod," // row[1]
|
||||||
"social_pubs.NotCod," // row[2]
|
"social_pubs.NotCod," // row[2]
|
||||||
"UNIX_TIMESTAMP(social_pubs.TimePublish)," // row[3]
|
"UNIX_TIMESTAMP(social_pubs.TimePublish)," // row[3]
|
||||||
"social_comments.Content," // row[4] // TODO: Rename as Txt
|
"social_comments.Txt," // row[4]
|
||||||
"social_comments.MedCod" // row[5]
|
"social_comments.MedCod" // row[5]
|
||||||
" FROM social_pubs,social_comments"
|
" FROM social_pubs,social_comments"
|
||||||
" WHERE social_pubs.PubCod=%ld"
|
" WHERE social_pubs.PubCod=%ld"
|
||||||
|
@ -5064,7 +5064,7 @@ static void TL_GetDataOfCommentFromRow (MYSQL_ROW row,struct TL_Comment *SocCom)
|
||||||
row[1]: PublisherCod
|
row[1]: PublisherCod
|
||||||
row[2]: NotCod
|
row[2]: NotCod
|
||||||
row[3]: TimePublish
|
row[3]: TimePublish
|
||||||
row[4]: Content // TODO: Rename as Txt
|
row[4]: Txt
|
||||||
row[5]: MedCod
|
row[5]: MedCod
|
||||||
*/
|
*/
|
||||||
/***** Get code of comment (row[0]) *****/
|
/***** Get code of comment (row[0]) *****/
|
||||||
|
@ -5211,9 +5211,8 @@ void TL_GetNotifPublication (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||||
if (SocNot.NoteType == TL_NOTE_POST)
|
if (SocNot.NoteType == TL_NOTE_POST)
|
||||||
{
|
{
|
||||||
/***** Get content of post from database *****/
|
/***** Get content of post from database *****/
|
||||||
// TODO: What happens if content is empty and an image is attached?
|
|
||||||
if (DB_QuerySELECT (&mysql_res,"can not get the content of a post",
|
if (DB_QuerySELECT (&mysql_res,"can not get the content of a post",
|
||||||
"SELECT Content" // TODO: Rename as Txt
|
"SELECT Txt" // row[0]
|
||||||
" FROM social_posts"
|
" FROM social_posts"
|
||||||
" WHERE PstCod=%ld",
|
" WHERE PstCod=%ld",
|
||||||
SocNot.Cod) == 1) // Result should have a unique row
|
SocNot.Cod) == 1) // Result should have a unique row
|
||||||
|
@ -5251,10 +5250,9 @@ void TL_GetNotifPublication (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||||
break;
|
break;
|
||||||
case TL_PUB_COMMENT_TO_NOTE:
|
case TL_PUB_COMMENT_TO_NOTE:
|
||||||
/***** Get content of post from database *****/
|
/***** Get content of post from database *****/
|
||||||
// TODO: What happens if content is empty and an image is attached?
|
|
||||||
if (DB_QuerySELECT (&mysql_res,"can not get the content"
|
if (DB_QuerySELECT (&mysql_res,"can not get the content"
|
||||||
" of a comment to a note",
|
" of a comment to a note",
|
||||||
"SELECT Content" // TODO: Rename as Txt
|
"SELECT Txt" // row[0]
|
||||||
" FROM social_comments"
|
" FROM social_comments"
|
||||||
" WHERE PubCod=%ld",
|
" WHERE PubCod=%ld",
|
||||||
SocPub.PubCod) == 1) // Result should have a unique row
|
SocPub.PubCod) == 1) // Result should have a unique row
|
||||||
|
|
Loading…
Reference in New Issue
Block a user