mirror of https://github.com/acanas/swad-core.git
Version 17.21.3
This commit is contained in:
parent
7f8ae3fdcf
commit
63410e4c96
|
@ -256,13 +256,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 17.21.1 (2017-10-08)"
|
#define Log_PLATFORM_VERSION "SWAD 17.21.3 (2017-10-08)"
|
||||||
#define CSS_FILE "swad17.0.css"
|
#define CSS_FILE "swad17.0.css"
|
||||||
#define JS_FILE "swad17.17.1.js"
|
#define JS_FILE "swad17.17.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 17.21.3: Oct 08, 2017 Remove project files when removing project. (233169 lines)
|
||||||
Version 17.21.2: Oct 08, 2017 Renamed root folder for project documents. (233115 lines)
|
Version 17.21.2: Oct 08, 2017 Renamed root folder for project documents. (233115 lines)
|
||||||
Version 17.21.1: Oct 08, 2017 Remove project directories when removing project. (233114 lines)
|
Version 17.21.1: Oct 08, 2017 Remove project directories when removing project. (233114 lines)
|
||||||
Version 17.21: Oct 07, 2017 Start and end dates in projects are replaced by time of creation and time of modification. (233106 lines)
|
Version 17.21: Oct 07, 2017 Start and end dates in projects are replaced by time of creation and time of modification. (233106 lines)
|
||||||
|
|
|
@ -4732,6 +4732,64 @@ void Brw_RemoveGrpFilesFromDB (long GrpCod)
|
||||||
DB_QueryDELETE (Query,"can not remove files of a group");
|
DB_QueryDELETE (Query,"can not remove files of a group");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*********** Remove files related to a project from the database *************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Brw_RemovePrjFilesFromDB (long PrjCod)
|
||||||
|
{
|
||||||
|
char Query[512];
|
||||||
|
|
||||||
|
/***** Remove from database the entries that store the file views *****/
|
||||||
|
sprintf (Query,"DELETE FROM file_view USING file_view,files"
|
||||||
|
" WHERE files.FileBrowser IN (%u)"
|
||||||
|
" AND files.Cod=%ld"
|
||||||
|
" AND files.FilCod=file_view.FilCod",
|
||||||
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
PrjCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove file views to files of a project");
|
||||||
|
|
||||||
|
/***** Remove from database expanded folders *****/
|
||||||
|
sprintf (Query,"DELETE LOW_PRIORITY FROM expanded_folders"
|
||||||
|
" WHERE FileBrowser IN (%u)"
|
||||||
|
" AND Cod=%ld",
|
||||||
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
PrjCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove expanded folders of a project");
|
||||||
|
|
||||||
|
/***** Remove from database the entries that store clipboards *****/
|
||||||
|
sprintf (Query,"DELETE FROM clipboard"
|
||||||
|
" WHERE FileBrowser IN (%u)"
|
||||||
|
" AND Cod=%ld",
|
||||||
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
PrjCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove clipboards related to files of a project");
|
||||||
|
|
||||||
|
/***** Remove from database the entries that store the last time users visited file zones *****/
|
||||||
|
sprintf (Query,"DELETE FROM file_browser_last"
|
||||||
|
" WHERE FileBrowser IN (%u)"
|
||||||
|
" AND Cod=%ld",
|
||||||
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
PrjCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove file last visits to files of a project");
|
||||||
|
|
||||||
|
/***** Remove from database the entries that store the sizes of the file zones *****/
|
||||||
|
sprintf (Query,"DELETE FROM file_browser_size"
|
||||||
|
" WHERE FileBrowser IN (%u)"
|
||||||
|
" AND Cod=%ld",
|
||||||
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
PrjCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove sizes of file zones of a project");
|
||||||
|
|
||||||
|
/***** Remove from database the entries that store the data files *****/
|
||||||
|
sprintf (Query,"DELETE FROM files"
|
||||||
|
" WHERE FileBrowser IN (%u)"
|
||||||
|
" AND Cod=%ld",
|
||||||
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
PrjCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove files of a project");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Remove some info about files related to a course and a user from database */
|
/* Remove some info about files related to a course and a user from database */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -182,6 +182,7 @@ void Brw_RemoveCtrFilesFromDB (long CtrCod);
|
||||||
void Brw_RemoveDegFilesFromDB (long DegCod);
|
void Brw_RemoveDegFilesFromDB (long DegCod);
|
||||||
void Brw_RemoveCrsFilesFromDB (long CrsCod);
|
void Brw_RemoveCrsFilesFromDB (long CrsCod);
|
||||||
void Brw_RemoveGrpFilesFromDB (long GrpCod);
|
void Brw_RemoveGrpFilesFromDB (long GrpCod);
|
||||||
|
void Brw_RemovePrjFilesFromDB (long PrjCod);
|
||||||
void Brw_RemoveSomeInfoAboutCrsUsrFilesFromDB (long UsrCod,long CrsCod);
|
void Brw_RemoveSomeInfoAboutCrsUsrFilesFromDB (long UsrCod,long CrsCod);
|
||||||
void Brw_RemoveWrkFilesFromDB (long CrsCod,long UsrCod);
|
void Brw_RemoveWrkFilesFromDB (long CrsCod,long UsrCod);
|
||||||
void Brw_RemoveUsrFilesFromDB (long UsrCod);
|
void Brw_RemoveUsrFilesFromDB (long UsrCod);
|
||||||
|
|
|
@ -2319,6 +2319,9 @@ void Prj_RemoveProject (void)
|
||||||
Prj.PrjCod,Gbl.CurrentCrs.Crs.CrsCod);
|
Prj.PrjCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||||
DB_QueryDELETE (Query,"can not remove project");
|
DB_QueryDELETE (Query,"can not remove project");
|
||||||
|
|
||||||
|
/***** Remove information related to files in project *****/
|
||||||
|
Brw_RemovePrjFilesFromDB (Prj.PrjCod);
|
||||||
|
|
||||||
/***** Remove directory of the project *****/
|
/***** Remove directory of the project *****/
|
||||||
sprintf (PathRelPrj,"%s/%s/%ld/%s/%02u/%ld",
|
sprintf (PathRelPrj,"%s/%s/%ld/%s/%02u/%ld",
|
||||||
Cfg_PATH_SWAD_PRIVATE,Cfg_FOLDER_CRS,Prj.CrsCod,Cfg_FOLDER_PRJ,
|
Cfg_PATH_SWAD_PRIVATE,Cfg_FOLDER_CRS,Prj.CrsCod,Cfg_FOLDER_PRJ,
|
||||||
|
|
Loading…
Reference in New Issue