mirror of https://github.com/acanas/swad-core.git
Version 15.120.4
This commit is contained in:
parent
5933e9cb58
commit
5262401fad
|
@ -941,12 +941,13 @@ CREATE TABLE IF NOT EXISTS social_notes (
|
|||
-- Table social_notes_fav: stores users who marked social notes as favourite
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS social_notes_fav (
|
||||
FavCod BIGINT AUTO_INCREMENT,
|
||||
NotCod BIGINT NOT NULL,
|
||||
UsrCod INT NOT NULL,
|
||||
TimeFav DATETIME NOT NULL,
|
||||
UNIQUE INDEX(FavCod),
|
||||
UNIQUE INDEX(NotCod,UsrCod),
|
||||
INDEX(UsrCod),
|
||||
INDEX(TimeFav));
|
||||
INDEX(UsrCod));
|
||||
--
|
||||
-- Table social_posts: stores social posts (public comments written by users)
|
||||
--
|
||||
|
|
|
@ -118,17 +118,26 @@
|
|||
// TODO: Width of column for data in notifications is too short
|
||||
// TODO: Increment one second after each refresh in social timeline?
|
||||
|
||||
// TODO: Remove favs when user is removed
|
||||
// TODO: Remove favs when note is removed
|
||||
// TODO: Fav comments (remove favs when comment is removed)
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.120.3 (2016-01-19)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.120.4 (2016-01-19)"
|
||||
#define CSS_FILE "swad15.120.3.css"
|
||||
#define JS_FILE "swad15.118.4.js"
|
||||
|
||||
// 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
|
||||
/*
|
||||
Version 15.120.4: Jan 19, 2016 Changes in database table social_notes_fav. (193527 lines)
|
||||
2 changes necessary in database:
|
||||
DROP TABLE social_notes_fav;
|
||||
CREATE TABLE IF NOT EXISTS social_notes_fav (FavCod BIGINT AUTO_INCREMENT,NotCod BIGINT NOT NULL,UsrCod INT NOT NULL,TimeFav DATETIME NOT NULL,UNIQUE INDEX(FavCod),UNIQUE INDEX(NotCod,UsrCod),INDEX(UsrCod));
|
||||
|
||||
Version 15.120.3: Jan 19, 2016 Minor changes in layout of timeline. (193517 lines)
|
||||
Version 15.120.2: Jan 19, 2016 Code optimization on sharers or favers. (193491 lines)
|
||||
Version 15.120.1: Jan 19, 2016 Show number of users who marked a social note as favourite. (193533 lines)
|
||||
|
|
|
@ -1989,22 +1989,24 @@ mysql> DESCRIBE social_notes;
|
|||
/***** Table social_notes_fav *****/
|
||||
/*
|
||||
mysql> DESCRIBE social_notes_fav;
|
||||
+---------+------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+---------+------------+------+-----+---------+-------+
|
||||
| NotCod | bigint(20) | NO | PRI | NULL | |
|
||||
| UsrCod | int(11) | NO | PRI | NULL | |
|
||||
| TimeFav | datetime | NO | MUL | NULL | |
|
||||
+---------+------------+------+-----+---------+-------+
|
||||
3 rows in set (0.00 sec)
|
||||
+---------+------------+------+-----+---------+----------------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+---------+------------+------+-----+---------+----------------+
|
||||
| FavCod | bigint(20) | NO | PRI | NULL | auto_increment |
|
||||
| NotCod | bigint(20) | NO | MUL | NULL | |
|
||||
| UsrCod | int(11) | NO | MUL | NULL | |
|
||||
| TimeFav | datetime | NO | | NULL | |
|
||||
+---------+------------+------+-----+---------+----------------+
|
||||
4 rows in set (0.00 sec)
|
||||
*/
|
||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS social_notes_fav ("
|
||||
"FavCod BIGINT AUTO_INCREMENT,"
|
||||
"NotCod BIGINT NOT NULL,"
|
||||
"UsrCod INT NOT NULL,"
|
||||
"TimeFav DATETIME NOT NULL,"
|
||||
"TimeFav DATETIME NOT NULL," // Not used. For future use
|
||||
"UNIQUE INDEX(FavCod),"
|
||||
"UNIQUE INDEX(NotCod,UsrCod),"
|
||||
"INDEX(UsrCod),"
|
||||
"INDEX(TimeFav))");
|
||||
"INDEX(UsrCod))");
|
||||
|
||||
/***** Table social_posts *****/
|
||||
/*
|
||||
|
|
|
@ -3467,7 +3467,7 @@ static void Soc_ShowUsrsWhoHaveMarkedSocialNoteAsFav (const struct SocialNote *S
|
|||
" FROM social_notes_fav"
|
||||
" WHERE NotCod='%ld'"
|
||||
" AND UsrCod<>'%ld'" // Extra check
|
||||
" ORDER BY TimeFav LIMIT %u",
|
||||
" ORDER BY FavCod LIMIT %u",
|
||||
SocNot->NotCod,
|
||||
SocNot->UsrCod,
|
||||
Soc_MAX_SHARERS_FAVERS_SHOWN);
|
||||
|
|
Loading…
Reference in New Issue