mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-19 23:17:07 +02:00
Version18.81.5
This commit is contained in:
parent
033766858f
commit
db0921ab18
|
@ -459,10 +459,11 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.81.4 (2019-03-19)"
|
#define Log_PLATFORM_VERSION "SWAD 18.81.5 (2019-03-19)"
|
||||||
#define CSS_FILE "swad18.80.css"
|
#define CSS_FILE "swad18.80.css"
|
||||||
#define JS_FILE "swad18.80.js"
|
#define JS_FILE "swad18.80.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.81.5: Mar 19, 2019 Code refactoring related to media. (240594 lines)
|
||||||
Version 18.81.4: Mar 19, 2019 Code refactoring related to media. (240586 lines)
|
Version 18.81.4: Mar 19, 2019 Code refactoring related to media. (240586 lines)
|
||||||
Version 18.81.3: Mar 19, 2019 Remove unused fields MediaName,MediaType,MediaTitle,MediaURL,Media from tables. (240657 lines)
|
Version 18.81.3: Mar 19, 2019 Remove unused fields MediaName,MediaType,MediaTitle,MediaURL,Media from tables. (240657 lines)
|
||||||
8 changes necessary in database:
|
8 changes necessary in database:
|
||||||
|
|
|
@ -8498,8 +8498,7 @@ void Tst_RemoveCrsTests (long CrsCod)
|
||||||
" AND tst_questions.QstCod=tst_answers.QstCod",
|
" AND tst_questions.QstCod=tst_answers.QstCod",
|
||||||
CrsCod);
|
CrsCod);
|
||||||
|
|
||||||
/***** Remove files with images associated
|
/***** Remove media associated to test questions in the course *****/
|
||||||
to test questions in the course *****/
|
|
||||||
Tst_RemoveAllMedFilesFromAnsOfAllQstsInCrs (CrsCod);
|
Tst_RemoveAllMedFilesFromAnsOfAllQstsInCrs (CrsCod);
|
||||||
Tst_RemoveAllMedFilesFromStemOfAllQstsInCrs (CrsCod);
|
Tst_RemoveAllMedFilesFromStemOfAllQstsInCrs (CrsCod);
|
||||||
|
|
||||||
|
|
|
@ -3858,7 +3858,7 @@ static void TL_RemoveNoteMediaAndDBEntries (struct TL_Note *SocNot)
|
||||||
long PubCod;
|
long PubCod;
|
||||||
unsigned long NumComments;
|
unsigned long NumComments;
|
||||||
unsigned long NumCom;
|
unsigned long NumCom;
|
||||||
unsigned NumMedia;
|
long MedCod;
|
||||||
|
|
||||||
/***** Remove comments associated to this note *****/
|
/***** Remove comments associated to this note *****/
|
||||||
/* Get comments of this note */
|
/* Get comments of this note */
|
||||||
|
@ -3889,16 +3889,20 @@ static void TL_RemoveNoteMediaAndDBEntries (struct TL_Note *SocNot)
|
||||||
/***** Remove media associated to post *****/
|
/***** Remove media associated to post *****/
|
||||||
if (SocNot->NoteType == TL_NOTE_POST)
|
if (SocNot->NoteType == TL_NOTE_POST)
|
||||||
{
|
{
|
||||||
/* Get name of media associated to a post from database */
|
/* Remove media associated to a post from database */
|
||||||
NumMedia =
|
if (DB_QuerySELECT (&mysql_res,"can not get media",
|
||||||
(unsigned) DB_QuerySELECT (&mysql_res,"can not get media",
|
|
||||||
"SELECT MedCod" // row[0]
|
"SELECT MedCod" // row[0]
|
||||||
" FROM social_posts"
|
" FROM social_posts"
|
||||||
" WHERE PstCod=%ld",
|
" WHERE PstCod=%ld",
|
||||||
SocNot->Cod);
|
SocNot->Cod) == 1) // Result should have a unique row
|
||||||
|
{
|
||||||
|
/* Get media code */
|
||||||
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
MedCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
|
|
||||||
/* Remove media */
|
/* Remove media */
|
||||||
Med_RemoveMediaFromAllRows (NumMedia,mysql_res);
|
Med_RemoveMedia (MedCod);
|
||||||
|
}
|
||||||
|
|
||||||
/* Free structure that stores the query result */
|
/* Free structure that stores the query result */
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
@ -4170,19 +4174,23 @@ static void TL_RemoveComment (void)
|
||||||
static void TL_RemoveCommentMediaAndDBEntries (long PubCod)
|
static void TL_RemoveCommentMediaAndDBEntries (long PubCod)
|
||||||
{
|
{
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned NumMedia;
|
MYSQL_ROW row;
|
||||||
|
long MedCod;;
|
||||||
|
|
||||||
/***** Remove media associated to comment *****/
|
/***** Remove media associated to comment *****/
|
||||||
/* Get name of media associated to a comment from database */
|
if (DB_QuerySELECT (&mysql_res,"can not get media",
|
||||||
NumMedia =
|
"SELECT MedCod" // row[0]
|
||||||
(unsigned) DB_QuerySELECT (&mysql_res,"can not get media",
|
" FROM social_comments"
|
||||||
"SELECT MedCod" // row[0]
|
" WHERE PubCod=%ld",
|
||||||
" FROM social_comments"
|
PubCod) == 1) // Result should have a unique row
|
||||||
" WHERE PubCod=%ld",
|
{
|
||||||
PubCod);
|
/* Get media code */
|
||||||
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
MedCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
|
|
||||||
/* Remove media */
|
/* Remove media */
|
||||||
Med_RemoveMediaFromAllRows (NumMedia,mysql_res);
|
Med_RemoveMedia (MedCod);
|
||||||
|
}
|
||||||
|
|
||||||
/* Free structure that stores the query result */
|
/* Free structure that stores the query result */
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user