mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-05 08:15:25 +02:00
Version 20.51.6: Mar 18, 2021 Files database table renamed.
This commit is contained in:
parent
eb3a037556
commit
72959c7f0d
68
sql/swad.sql
68
sql/swad.sql
|
@ -164,6 +164,40 @@ CREATE TABLE IF NOT EXISTS brw_expanded_folders (
|
||||||
INDEX(FileBrowser,Cod),
|
INDEX(FileBrowser,Cod),
|
||||||
INDEX(WorksUsrCod));
|
INDEX(WorksUsrCod));
|
||||||
--
|
--
|
||||||
|
-- Table file_cache: stores the media private paths linked from public directories in current session
|
||||||
|
--
|
||||||
|
CREATE TABLE IF NOT EXISTS file_cache (
|
||||||
|
SessionId CHAR(43) NOT NULL,
|
||||||
|
PrivPath TEXT COLLATE latin1_bin NOT NULL,
|
||||||
|
TmpPubDir TEXT COLLATE latin1_bin NOT NULL,
|
||||||
|
INDEX(SessionId));
|
||||||
|
--
|
||||||
|
-- Table file_view: stores the number of times each user has seen each file
|
||||||
|
--
|
||||||
|
CREATE TABLE IF NOT EXISTS file_view (
|
||||||
|
FilCod INT NOT NULL,
|
||||||
|
UsrCod INT NOT NULL,
|
||||||
|
NumViews INT NOT NULL DEFAULT 0,
|
||||||
|
UNIQUE INDEX(FilCod,UsrCod),INDEX(UsrCod));
|
||||||
|
--
|
||||||
|
-- Table brw_files: stores metadata about each file
|
||||||
|
--
|
||||||
|
CREATE TABLE IF NOT EXISTS brw_files (
|
||||||
|
FilCod INT NOT NULL AUTO_INCREMENT,
|
||||||
|
FileBrowser TINYINT NOT NULL,
|
||||||
|
Cod INT NOT NULL DEFAULT -1,
|
||||||
|
ZoneUsrCod INT NOT NULL DEFAULT -1,
|
||||||
|
PublisherUsrCod INT NOT NULL,
|
||||||
|
FileType TINYINT NOT NULL DEFAULT 0,
|
||||||
|
Path TEXT COLLATE latin1_bin NOT NULL,
|
||||||
|
Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',
|
||||||
|
Public ENUM('N','Y') NOT NULL DEFAULT 'N',
|
||||||
|
License TINYINT NOT NULL DEFAULT 0,
|
||||||
|
UNIQUE INDEX(FilCod),
|
||||||
|
INDEX(FileBrowser,Cod,ZoneUsrCod),
|
||||||
|
INDEX(ZoneUsrCod),
|
||||||
|
INDEX(PublisherUsrCod));
|
||||||
|
--
|
||||||
-- Table brw_last: stores the last click of every user in each file browser zone
|
-- Table brw_last: stores the last click of every user in each file browser zone
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS brw_last (
|
CREATE TABLE IF NOT EXISTS brw_last (
|
||||||
|
@ -604,40 +638,6 @@ CREATE TABLE IF NOT EXISTS fig_figures (
|
||||||
LastUpdate TIMESTAMP,
|
LastUpdate TIMESTAMP,
|
||||||
UNIQUE INDEX(Figure,Scope,Cod));
|
UNIQUE INDEX(Figure,Scope,Cod));
|
||||||
--
|
--
|
||||||
-- Table file_cache: stores the media private paths linked from public directories in current session
|
|
||||||
--
|
|
||||||
CREATE TABLE IF NOT EXISTS file_cache (
|
|
||||||
SessionId CHAR(43) NOT NULL,
|
|
||||||
PrivPath TEXT COLLATE latin1_bin NOT NULL,
|
|
||||||
TmpPubDir TEXT COLLATE latin1_bin NOT NULL,
|
|
||||||
INDEX(SessionId));
|
|
||||||
--
|
|
||||||
-- Table file_view: stores the number of times each user has seen each file
|
|
||||||
--
|
|
||||||
CREATE TABLE IF NOT EXISTS file_view (
|
|
||||||
FilCod INT NOT NULL,
|
|
||||||
UsrCod INT NOT NULL,
|
|
||||||
NumViews INT NOT NULL DEFAULT 0,
|
|
||||||
UNIQUE INDEX(FilCod,UsrCod),INDEX(UsrCod));
|
|
||||||
--
|
|
||||||
-- Table files: stores metadata about each file
|
|
||||||
--
|
|
||||||
CREATE TABLE IF NOT EXISTS files (
|
|
||||||
FilCod INT NOT NULL AUTO_INCREMENT,
|
|
||||||
FileBrowser TINYINT NOT NULL,
|
|
||||||
Cod INT NOT NULL DEFAULT -1,
|
|
||||||
ZoneUsrCod INT NOT NULL DEFAULT -1,
|
|
||||||
PublisherUsrCod INT NOT NULL,
|
|
||||||
FileType TINYINT NOT NULL DEFAULT 0,
|
|
||||||
Path TEXT COLLATE latin1_bin NOT NULL,
|
|
||||||
Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',
|
|
||||||
Public ENUM('N','Y') NOT NULL DEFAULT 'N',
|
|
||||||
License TINYINT NOT NULL DEFAULT 0,
|
|
||||||
UNIQUE INDEX(FilCod),
|
|
||||||
INDEX(FileBrowser,Cod,ZoneUsrCod),
|
|
||||||
INDEX(ZoneUsrCod),
|
|
||||||
INDEX(PublisherUsrCod));
|
|
||||||
--
|
|
||||||
-- Table firewall_banned: stores the banned IPs in order to mitigate denial of service attacks
|
-- Table firewall_banned: stores the banned IPs in order to mitigate denial of service attacks
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS firewall_banned (
|
CREATE TABLE IF NOT EXISTS firewall_banned (
|
||||||
|
|
|
@ -600,14 +600,18 @@ TODO: Salvador Romero Cort
|
||||||
|
|
||||||
TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria.
|
TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 20.51.5 (2021-03-18)"
|
#define Log_PLATFORM_VERSION "SWAD 20.51.6 (2021-03-18)"
|
||||||
#define CSS_FILE "swad20.45.css"
|
#define CSS_FILE "swad20.45.css"
|
||||||
#define JS_FILE "swad20.6.2.js"
|
#define JS_FILE "swad20.6.2.js"
|
||||||
/*
|
/*
|
||||||
TODO: Rename CENTRE to CENTER in help wiki.
|
TODO: Rename CENTRE to CENTER in help wiki.
|
||||||
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
|
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
|
||||||
|
|
||||||
Version 20.51.5: Mar 18, 2021 File-browser-size database table renamed. (307563 lines)
|
Version 20.51.6: Mar 18, 2021 Files database table renamed. (307697 lines)
|
||||||
|
1 change necessary in database:
|
||||||
|
RENAME TABLE files TO brw_files;
|
||||||
|
|
||||||
|
Version 20.51.5: Mar 18, 2021 File-browser-size database table renamed. (307594 lines)
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
RENAME TABLE file_browser_size TO brw_sizes;
|
RENAME TABLE file_browser_size TO brw_sizes;
|
||||||
|
|
||||||
|
|
144
swad_database.c
144
swad_database.c
|
@ -435,6 +435,78 @@ mysql> DESCRIBE brw_expanded_folders;
|
||||||
"INDEX(FileBrowser,Cod),"
|
"INDEX(FileBrowser,Cod),"
|
||||||
"INDEX(WorksUsrCod))");
|
"INDEX(WorksUsrCod))");
|
||||||
|
|
||||||
|
/***** Table file_cache *****/
|
||||||
|
/*
|
||||||
|
mysql> DESCRIBE file_cache;
|
||||||
|
+-----------+----------+------+-----+---------+-------+
|
||||||
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
|
+-----------+----------+------+-----+---------+-------+
|
||||||
|
| SessionId | char(43) | NO | MUL | NULL | |
|
||||||
|
| PrivPath | text | NO | | NULL | |
|
||||||
|
| TmpPubDir | text | NO | | NULL | |
|
||||||
|
+-----------+----------+------+-----+---------+-------+
|
||||||
|
3 rows in set (0.01 sec)
|
||||||
|
*/
|
||||||
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS file_cache ("
|
||||||
|
"SessionId CHAR(43) NOT NULL," // Cns_BYTES_SESSION_ID
|
||||||
|
"PrivPath VARCHAR(4096) COLLATE latin1_bin NOT NULL," // PATH_MAX
|
||||||
|
"TmpPubDir VARCHAR(4096) COLLATE latin1_bin NOT NULL," // PATH_MAX
|
||||||
|
"UNIQUE INDEX(SessionId))");
|
||||||
|
|
||||||
|
/***** Table file_view *****/
|
||||||
|
/*
|
||||||
|
mysql> DESCRIBE file_view;
|
||||||
|
+----------+---------+------+-----+---------+-------+
|
||||||
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
|
+----------+---------+------+-----+---------+-------+
|
||||||
|
| FilCod | int(11) | NO | PRI | NULL | |
|
||||||
|
| UsrCod | int(11) | NO | PRI | NULL | |
|
||||||
|
| NumViews | int(11) | NO | | 0 | |
|
||||||
|
+----------+---------+------+-----+---------+-------+
|
||||||
|
3 rows in set (0.00 sec)
|
||||||
|
*/
|
||||||
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS file_view ("
|
||||||
|
"FilCod INT NOT NULL,"
|
||||||
|
"UsrCod INT NOT NULL,"
|
||||||
|
"NumViews INT NOT NULL DEFAULT 0,"
|
||||||
|
"UNIQUE INDEX(FilCod,UsrCod),"
|
||||||
|
"INDEX(UsrCod))");
|
||||||
|
|
||||||
|
/***** Table brw_files *****/
|
||||||
|
/*
|
||||||
|
mysql> DESCRIBE brw_files;
|
||||||
|
+-----------------+---------------+------+-----+---------+----------------+
|
||||||
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
|
+-----------------+---------------+------+-----+---------+----------------+
|
||||||
|
| FilCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||||
|
| FileBrowser | tinyint(4) | NO | MUL | NULL | |
|
||||||
|
| Cod | int(11) | NO | | -1 | |
|
||||||
|
| ZoneUsrCod | int(11) | NO | MUL | -1 | |
|
||||||
|
| PublisherUsrCod | int(11) | NO | MUL | NULL | |
|
||||||
|
| FileType | tinyint(4) | NO | | 0 | |
|
||||||
|
| Path | text | NO | | NULL | |
|
||||||
|
| Hidden | enum('N','Y') | NO | | N | |
|
||||||
|
| Public | enum('N','Y') | NO | | N | |
|
||||||
|
| License | tinyint(4) | NO | | 0 | |
|
||||||
|
+-----------------+---------------+------+-----+---------+----------------+
|
||||||
|
10 rows in set (0.00 sec)
|
||||||
|
*/
|
||||||
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS brw_files ("
|
||||||
|
"FilCod INT NOT NULL AUTO_INCREMENT,"
|
||||||
|
"FileBrowser TINYINT NOT NULL,"
|
||||||
|
"Cod INT NOT NULL DEFAULT -1,"
|
||||||
|
"ZoneUsrCod INT NOT NULL DEFAULT -1,"
|
||||||
|
"PublisherUsrCod INT NOT NULL,"
|
||||||
|
"FileType TINYINT NOT NULL DEFAULT 0,"
|
||||||
|
"Path TEXT COLLATE latin1_bin NOT NULL," // PATH_MAX
|
||||||
|
"Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
||||||
|
"Public ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
||||||
|
"License TINYINT NOT NULL DEFAULT 0,"
|
||||||
|
"UNIQUE INDEX(FilCod),"
|
||||||
|
"INDEX(FileBrowser,Cod,ZoneUsrCod),"
|
||||||
|
"INDEX(ZoneUsrCod),"
|
||||||
|
"INDEX(PublisherUsrCod))");
|
||||||
|
|
||||||
/***** Table brw_last *****/
|
/***** Table brw_last *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE brw_last;
|
mysql> DESCRIBE brw_last;
|
||||||
|
@ -1326,78 +1398,6 @@ mysql> DESCRIBE fig_figures;
|
||||||
"LastUpdate TIMESTAMP,"
|
"LastUpdate TIMESTAMP,"
|
||||||
"UNIQUE INDEX(Figure,Scope,Cod))");
|
"UNIQUE INDEX(Figure,Scope,Cod))");
|
||||||
|
|
||||||
/***** Table file_cache *****/
|
|
||||||
/*
|
|
||||||
mysql> DESCRIBE file_cache;
|
|
||||||
+-----------+----------+------+-----+---------+-------+
|
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
|
||||||
+-----------+----------+------+-----+---------+-------+
|
|
||||||
| SessionId | char(43) | NO | MUL | NULL | |
|
|
||||||
| PrivPath | text | NO | | NULL | |
|
|
||||||
| TmpPubDir | text | NO | | NULL | |
|
|
||||||
+-----------+----------+------+-----+---------+-------+
|
|
||||||
3 rows in set (0.01 sec)
|
|
||||||
*/
|
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS file_cache ("
|
|
||||||
"SessionId CHAR(43) NOT NULL," // Cns_BYTES_SESSION_ID
|
|
||||||
"PrivPath VARCHAR(4096) COLLATE latin1_bin NOT NULL," // PATH_MAX
|
|
||||||
"TmpPubDir VARCHAR(4096) COLLATE latin1_bin NOT NULL," // PATH_MAX
|
|
||||||
"UNIQUE INDEX(SessionId))");
|
|
||||||
|
|
||||||
/***** Table file_view *****/
|
|
||||||
/*
|
|
||||||
mysql> DESCRIBE file_view;
|
|
||||||
+----------+---------+------+-----+---------+-------+
|
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
|
||||||
+----------+---------+------+-----+---------+-------+
|
|
||||||
| FilCod | int(11) | NO | PRI | NULL | |
|
|
||||||
| UsrCod | int(11) | NO | PRI | NULL | |
|
|
||||||
| NumViews | int(11) | NO | | 0 | |
|
|
||||||
+----------+---------+------+-----+---------+-------+
|
|
||||||
3 rows in set (0.00 sec)
|
|
||||||
*/
|
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS file_view ("
|
|
||||||
"FilCod INT NOT NULL,"
|
|
||||||
"UsrCod INT NOT NULL,"
|
|
||||||
"NumViews INT NOT NULL DEFAULT 0,"
|
|
||||||
"UNIQUE INDEX(FilCod,UsrCod),"
|
|
||||||
"INDEX(UsrCod))");
|
|
||||||
|
|
||||||
/***** Table files *****/
|
|
||||||
/*
|
|
||||||
mysql> DESCRIBE files;
|
|
||||||
+-----------------+---------------+------+-----+---------+----------------+
|
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
|
||||||
+-----------------+---------------+------+-----+---------+----------------+
|
|
||||||
| FilCod | int(11) | NO | PRI | NULL | auto_increment |
|
|
||||||
| FileBrowser | tinyint(4) | NO | MUL | NULL | |
|
|
||||||
| Cod | int(11) | NO | | -1 | |
|
|
||||||
| ZoneUsrCod | int(11) | NO | MUL | -1 | |
|
|
||||||
| PublisherUsrCod | int(11) | NO | MUL | NULL | |
|
|
||||||
| FileType | tinyint(4) | NO | | 0 | |
|
|
||||||
| Path | text | NO | | NULL | |
|
|
||||||
| Hidden | enum('N','Y') | NO | | N | |
|
|
||||||
| Public | enum('N','Y') | NO | | N | |
|
|
||||||
| License | tinyint(4) | NO | | 0 | |
|
|
||||||
+-----------------+---------------+------+-----+---------+----------------+
|
|
||||||
10 rows in set (0.00 sec)
|
|
||||||
*/
|
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS files ("
|
|
||||||
"FilCod INT NOT NULL AUTO_INCREMENT,"
|
|
||||||
"FileBrowser TINYINT NOT NULL,"
|
|
||||||
"Cod INT NOT NULL DEFAULT -1,"
|
|
||||||
"ZoneUsrCod INT NOT NULL DEFAULT -1,"
|
|
||||||
"PublisherUsrCod INT NOT NULL,"
|
|
||||||
"FileType TINYINT NOT NULL DEFAULT 0,"
|
|
||||||
"Path TEXT COLLATE latin1_bin NOT NULL," // PATH_MAX
|
|
||||||
"Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
|
||||||
"Public ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
|
||||||
"License TINYINT NOT NULL DEFAULT 0,"
|
|
||||||
"UNIQUE INDEX(FilCod),"
|
|
||||||
"INDEX(FileBrowser,Cod,ZoneUsrCod),"
|
|
||||||
"INDEX(ZoneUsrCod),"
|
|
||||||
"INDEX(PublisherUsrCod))");
|
|
||||||
|
|
||||||
/***** Table firewall_banned *****/
|
/***** Table firewall_banned *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE firewall_banned;
|
mysql> DESCRIBE firewall_banned;
|
||||||
|
|
104
swad_figure.c
104
swad_figure.c
|
@ -2965,9 +2965,9 @@ static void Fig_GetNumberOfOERsFromDB (Hie_Lvl_Level_t Scope,Brw_License_t Licen
|
||||||
case Hie_Lvl_SYS:
|
case Hie_Lvl_SYS:
|
||||||
NumRows = (unsigned)
|
NumRows = (unsigned)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
||||||
"SELECT Public,"
|
"SELECT Public," // row[0]
|
||||||
"COUNT(*)"
|
"COUNT(*)" // row[1]
|
||||||
" FROM files"
|
" FROM brw_files"
|
||||||
" WHERE License=%u"
|
" WHERE License=%u"
|
||||||
" GROUP BY Public",
|
" GROUP BY Public",
|
||||||
(unsigned) License);
|
(unsigned) License);
|
||||||
|
@ -2975,21 +2975,21 @@ static void Fig_GetNumberOfOERsFromDB (Hie_Lvl_Level_t Scope,Brw_License_t Licen
|
||||||
case Hie_Lvl_CTY:
|
case Hie_Lvl_CTY:
|
||||||
NumRows = (unsigned)
|
NumRows = (unsigned)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
||||||
"SELECT files.Public,"
|
"SELECT brw_files.Public," // row[0]
|
||||||
"COUNT(*)"
|
"COUNT(*)" // row[1]
|
||||||
" FROM ins_instits,"
|
" FROM ins_instits,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"files"
|
"brw_files"
|
||||||
" WHERE ins_instits.CtyCod=%ld"
|
" WHERE ins_instits.CtyCod=%ld"
|
||||||
" AND ins_instits.InsCod=ctr_centers.InsCod"
|
" AND ins_instits.InsCod=ctr_centers.InsCod"
|
||||||
" AND ctr_centers.CtrCod=deg_degrees.CtrCod"
|
" AND ctr_centers.CtrCod=deg_degrees.CtrCod"
|
||||||
" AND deg_degrees.DegCod=crs_courses.DegCod"
|
" AND deg_degrees.DegCod=crs_courses.DegCod"
|
||||||
" AND crs_courses.CrsCod=files.Cod"
|
" AND crs_courses.CrsCod=brw_files.Cod"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.License=%u"
|
" AND brw_files.License=%u"
|
||||||
" GROUP BY files.Public",
|
" GROUP BY brw_files.Public",
|
||||||
Gbl.Hierarchy.Cty.CtyCod,
|
Gbl.Hierarchy.Cty.CtyCod,
|
||||||
(unsigned) Brw_ADMI_DOC_CRS,
|
(unsigned) Brw_ADMI_DOC_CRS,
|
||||||
(unsigned) Brw_ADMI_SHR_CRS,
|
(unsigned) Brw_ADMI_SHR_CRS,
|
||||||
|
@ -2998,19 +2998,19 @@ static void Fig_GetNumberOfOERsFromDB (Hie_Lvl_Level_t Scope,Brw_License_t Licen
|
||||||
case Hie_Lvl_INS:
|
case Hie_Lvl_INS:
|
||||||
NumRows = (unsigned)
|
NumRows = (unsigned)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
||||||
"SELECT files.Public,"
|
"SELECT brw_files.Public," // row[0]
|
||||||
"COUNT(*)"
|
"COUNT(*)" // row[1]
|
||||||
" FROM ctr_centers,"
|
" FROM ctr_centers,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"files"
|
"brw_files"
|
||||||
" WHERE ctr_centers.InsCod=%ld"
|
" WHERE ctr_centers.InsCod=%ld"
|
||||||
" AND ctr_centers.CtrCod=deg_degrees.CtrCod"
|
" AND ctr_centers.CtrCod=deg_degrees.CtrCod"
|
||||||
" AND deg_degrees.DegCod=crs_courses.DegCod"
|
" AND deg_degrees.DegCod=crs_courses.DegCod"
|
||||||
" AND crs_courses.CrsCod=files.Cod"
|
" AND crs_courses.CrsCod=brw_files.Cod"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.License=%u"
|
" AND brw_files.License=%u"
|
||||||
" GROUP BY files.Public",
|
" GROUP BY brw_files.Public",
|
||||||
Gbl.Hierarchy.Ins.InsCod,
|
Gbl.Hierarchy.Ins.InsCod,
|
||||||
(unsigned) Brw_ADMI_DOC_CRS,
|
(unsigned) Brw_ADMI_DOC_CRS,
|
||||||
(unsigned) Brw_ADMI_SHR_CRS,
|
(unsigned) Brw_ADMI_SHR_CRS,
|
||||||
|
@ -3019,17 +3019,17 @@ static void Fig_GetNumberOfOERsFromDB (Hie_Lvl_Level_t Scope,Brw_License_t Licen
|
||||||
case Hie_Lvl_CTR:
|
case Hie_Lvl_CTR:
|
||||||
NumRows = (unsigned)
|
NumRows = (unsigned)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
||||||
"SELECT files.Public,"
|
"SELECT brw_files.Public," // row[0]
|
||||||
"COUNT(*)"
|
"COUNT(*)" // row[1]
|
||||||
" FROM deg_degrees,"
|
" FROM deg_degrees,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"files"
|
"brw_files"
|
||||||
" WHERE deg_degrees.CtrCod=%ld"
|
" WHERE deg_degrees.CtrCod=%ld"
|
||||||
" AND deg_degrees.DegCod=crs_courses.DegCod"
|
" AND deg_degrees.DegCod=crs_courses.DegCod"
|
||||||
" AND crs_courses.CrsCod=files.Cod"
|
" AND crs_courses.CrsCod=brw_files.Cod"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.License=%u"
|
" AND brw_files.License=%u"
|
||||||
" GROUP BY files.Public",
|
" GROUP BY brw_files.Public",
|
||||||
Gbl.Hierarchy.Ctr.CtrCod,
|
Gbl.Hierarchy.Ctr.CtrCod,
|
||||||
(unsigned) Brw_ADMI_DOC_CRS,
|
(unsigned) Brw_ADMI_DOC_CRS,
|
||||||
(unsigned) Brw_ADMI_SHR_CRS,
|
(unsigned) Brw_ADMI_SHR_CRS,
|
||||||
|
@ -3038,15 +3038,15 @@ static void Fig_GetNumberOfOERsFromDB (Hie_Lvl_Level_t Scope,Brw_License_t Licen
|
||||||
case Hie_Lvl_DEG:
|
case Hie_Lvl_DEG:
|
||||||
NumRows = (unsigned)
|
NumRows = (unsigned)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
||||||
"SELECT files.Public,"
|
"SELECT brw_files.Public," // row[0]
|
||||||
"COUNT(*)"
|
"COUNT(*)" // row[1]
|
||||||
" FROM crs_courses,"
|
" FROM crs_courses,"
|
||||||
"files"
|
"brw_files"
|
||||||
" WHERE crs_courses.DegCod=%ld"
|
" WHERE crs_courses.DegCod=%ld"
|
||||||
" AND crs_courses.CrsCod=files.Cod"
|
" AND crs_courses.CrsCod=brw_files.Cod"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.License=%u"
|
" AND brw_files.License=%u"
|
||||||
" GROUP BY files.Public",
|
" GROUP BY brw_files.Public",
|
||||||
Gbl.Hierarchy.Deg.DegCod,
|
Gbl.Hierarchy.Deg.DegCod,
|
||||||
(unsigned) Brw_ADMI_DOC_CRS,
|
(unsigned) Brw_ADMI_DOC_CRS,
|
||||||
(unsigned) Brw_ADMI_SHR_CRS,
|
(unsigned) Brw_ADMI_SHR_CRS,
|
||||||
|
@ -3055,12 +3055,12 @@ static void Fig_GetNumberOfOERsFromDB (Hie_Lvl_Level_t Scope,Brw_License_t Licen
|
||||||
case Hie_Lvl_CRS:
|
case Hie_Lvl_CRS:
|
||||||
NumRows = (unsigned)
|
NumRows = (unsigned)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
DB_QuerySELECT (&mysql_res,"can not get number of OERs",
|
||||||
"SELECT Public,"
|
"SELECT Public," // row[0]
|
||||||
"COUNT(*)"
|
"COUNT(*)" // row[1]
|
||||||
" FROM files"
|
" FROM brw_files"
|
||||||
" WHERE Cod=%ld"
|
" WHERE Cod=%ld"
|
||||||
" AND FileBrowser IN (%u,%u)"
|
" AND FileBrowser IN (%u,%u)"
|
||||||
" AND License=%u"
|
" AND License=%u"
|
||||||
" GROUP BY Public",
|
" GROUP BY Public",
|
||||||
Gbl.Hierarchy.Crs.CrsCod,
|
Gbl.Hierarchy.Crs.CrsCod,
|
||||||
(unsigned) Brw_ADMI_DOC_CRS,
|
(unsigned) Brw_ADMI_DOC_CRS,
|
||||||
|
|
|
@ -4174,11 +4174,11 @@ void Brw_RemoveInsFilesFromDB (long InsCod)
|
||||||
/***** Remove from database the entries that store the file views *****/
|
/***** Remove from database the entries that store the file views *****/
|
||||||
DB_QueryDELETE ("can not remove file views to files of an institution",
|
DB_QueryDELETE ("can not remove file views to files of an institution",
|
||||||
"DELETE FROM file_view"
|
"DELETE FROM file_view"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"file_view"
|
"file_view"
|
||||||
" WHERE files.FileBrowser IN (%u,%u)"
|
" WHERE brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.Cod=%ld"
|
" AND brw_files.Cod=%ld"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) Brw_ADMI_DOC_INS,
|
(unsigned) Brw_ADMI_DOC_INS,
|
||||||
(unsigned) Brw_ADMI_SHR_INS,
|
(unsigned) Brw_ADMI_SHR_INS,
|
||||||
InsCod);
|
InsCod);
|
||||||
|
@ -4225,7 +4225,7 @@ void Brw_RemoveInsFilesFromDB (long InsCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the data files *****/
|
/***** Remove from database the entries that store the data files *****/
|
||||||
DB_QueryDELETE ("can not remove files of an institution",
|
DB_QueryDELETE ("can not remove files of an institution",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_INS,
|
(unsigned) Brw_ADMI_DOC_INS,
|
||||||
|
@ -4242,11 +4242,11 @@ void Brw_RemoveCtrFilesFromDB (long CtrCod)
|
||||||
/***** Remove from database the entries that store the file views *****/
|
/***** Remove from database the entries that store the file views *****/
|
||||||
DB_QueryDELETE ("can not remove file views to files of a center",
|
DB_QueryDELETE ("can not remove file views to files of a center",
|
||||||
"DELETE FROM file_view"
|
"DELETE FROM file_view"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"file_view"
|
"file_view"
|
||||||
" WHERE files.FileBrowser IN (%u,%u)"
|
" WHERE brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.Cod=%ld"
|
" AND brw_files.Cod=%ld"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) Brw_ADMI_DOC_CTR,
|
(unsigned) Brw_ADMI_DOC_CTR,
|
||||||
(unsigned) Brw_ADMI_SHR_CTR,
|
(unsigned) Brw_ADMI_SHR_CTR,
|
||||||
CtrCod);
|
CtrCod);
|
||||||
|
@ -4289,7 +4289,7 @@ void Brw_RemoveCtrFilesFromDB (long CtrCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the data files *****/
|
/***** Remove from database the entries that store the data files *****/
|
||||||
DB_QueryDELETE ("can not remove files of a center",
|
DB_QueryDELETE ("can not remove files of a center",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_CTR,
|
(unsigned) Brw_ADMI_DOC_CTR,
|
||||||
|
@ -4306,10 +4306,11 @@ void Brw_RemoveDegFilesFromDB (long DegCod)
|
||||||
/***** Remove from database the entries that store the file views *****/
|
/***** Remove from database the entries that store the file views *****/
|
||||||
DB_QueryDELETE ("can not remove file views to files of a degree",
|
DB_QueryDELETE ("can not remove file views to files of a degree",
|
||||||
"DELETE FROM file_view"
|
"DELETE FROM file_view"
|
||||||
" USING files,file_view"
|
" USING brw_files,"
|
||||||
" WHERE files.FileBrowser IN (%u,%u)"
|
"file_view"
|
||||||
" AND files.Cod=%ld"
|
" WHERE brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.Cod=%ld"
|
||||||
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) Brw_ADMI_DOC_DEG,
|
(unsigned) Brw_ADMI_DOC_DEG,
|
||||||
(unsigned) Brw_ADMI_SHR_DEG,
|
(unsigned) Brw_ADMI_SHR_DEG,
|
||||||
DegCod);
|
DegCod);
|
||||||
|
@ -4352,7 +4353,7 @@ void Brw_RemoveDegFilesFromDB (long DegCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the data files *****/
|
/***** Remove from database the entries that store the data files *****/
|
||||||
DB_QueryDELETE ("can not remove files of a degree",
|
DB_QueryDELETE ("can not remove files of a degree",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_DEG,
|
(unsigned) Brw_ADMI_DOC_DEG,
|
||||||
|
@ -4388,11 +4389,11 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
DB_QueryDELETE ("can not remove the properties of marks"
|
DB_QueryDELETE ("can not remove the properties of marks"
|
||||||
" associated to a course",
|
" associated to a course",
|
||||||
"DELETE FROM marks_properties"
|
"DELETE FROM marks_properties"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"marks_properties"
|
"marks_properties"
|
||||||
" WHERE files.FileBrowser=%u"
|
" WHERE brw_files.FileBrowser=%u"
|
||||||
" AND files.Cod=%ld"
|
" AND brw_files.Cod=%ld"
|
||||||
" AND files.FilCod=marks_properties.FilCod",
|
" AND brw_files.FilCod=marks_properties.FilCod",
|
||||||
(unsigned) Brw_ADMI_MRK_CRS,
|
(unsigned) Brw_ADMI_MRK_CRS,
|
||||||
CrsCod);
|
CrsCod);
|
||||||
|
|
||||||
|
@ -4400,11 +4401,11 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
/* Remove from course file zones */
|
/* Remove from course file zones */
|
||||||
DB_QueryDELETE ("can not remove file views to files of a course",
|
DB_QueryDELETE ("can not remove file views to files of a course",
|
||||||
"DELETE FROM file_view"
|
"DELETE FROM file_view"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"file_view"
|
"file_view"
|
||||||
" WHERE files.FileBrowser IN (%u,%u,%u,%u,%u,%u)"
|
" WHERE brw_files.FileBrowser IN (%u,%u,%u,%u,%u,%u)"
|
||||||
" AND files.Cod=%ld"
|
" AND brw_files.Cod=%ld"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) Brw_ADMI_DOC_CRS,
|
(unsigned) Brw_ADMI_DOC_CRS,
|
||||||
(unsigned) Brw_ADMI_TCH_CRS,
|
(unsigned) Brw_ADMI_TCH_CRS,
|
||||||
(unsigned) Brw_ADMI_SHR_CRS,
|
(unsigned) Brw_ADMI_SHR_CRS,
|
||||||
|
@ -4416,11 +4417,11 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
/* Remove from group file zones */
|
/* Remove from group file zones */
|
||||||
DB_QueryDELETE ("can not remove file views to files of a course",
|
DB_QueryDELETE ("can not remove file views to files of a course",
|
||||||
"DELETE FROM file_view"
|
"DELETE FROM file_view"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"file_view"
|
"file_view"
|
||||||
" WHERE files.FileBrowser IN (%u,%u,%u,%u)"
|
" WHERE brw_files.FileBrowser IN (%u,%u,%u,%u)"
|
||||||
" AND files.Cod IN %s"
|
" AND brw_files.Cod IN %s"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) Brw_ADMI_DOC_GRP,
|
(unsigned) Brw_ADMI_DOC_GRP,
|
||||||
(unsigned) Brw_ADMI_TCH_GRP,
|
(unsigned) Brw_ADMI_TCH_GRP,
|
||||||
(unsigned) Brw_ADMI_SHR_GRP,
|
(unsigned) Brw_ADMI_SHR_GRP,
|
||||||
|
@ -4430,11 +4431,11 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
/* Remove from project file zones */
|
/* Remove from project file zones */
|
||||||
DB_QueryDELETE ("can not remove file views to files of a course",
|
DB_QueryDELETE ("can not remove file views to files of a course",
|
||||||
"DELETE FROM file_view"
|
"DELETE FROM file_view"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"file_view"
|
"file_view"
|
||||||
" WHERE files.FileBrowser IN (%u,%u)"
|
" WHERE brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.Cod IN %s"
|
" AND brw_files.Cod IN %s"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) Brw_ADMI_DOC_PRJ,
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
(unsigned) Brw_ADMI_ASS_PRJ,
|
(unsigned) Brw_ADMI_ASS_PRJ,
|
||||||
SubqueryPrj);
|
SubqueryPrj);
|
||||||
|
@ -4583,7 +4584,7 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
/***** Remove from database the entries that store the data files *****/
|
/***** Remove from database the entries that store the data files *****/
|
||||||
/* Remove from course file zones */
|
/* Remove from course file zones */
|
||||||
DB_QueryDELETE ("can not remove files of a course",
|
DB_QueryDELETE ("can not remove files of a course",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser IN (%u,%u,%u,%u,%u,%u)"
|
" WHERE FileBrowser IN (%u,%u,%u,%u,%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_CRS,
|
(unsigned) Brw_ADMI_DOC_CRS,
|
||||||
|
@ -4596,7 +4597,7 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
|
|
||||||
/* Remove from group file zones */
|
/* Remove from group file zones */
|
||||||
DB_QueryDELETE ("can not remove files of a course",
|
DB_QueryDELETE ("can not remove files of a course",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser IN (%u,%u,%u,%u)"
|
" WHERE FileBrowser IN (%u,%u,%u,%u)"
|
||||||
" AND Cod IN %s",
|
" AND Cod IN %s",
|
||||||
(unsigned) Brw_ADMI_DOC_GRP,
|
(unsigned) Brw_ADMI_DOC_GRP,
|
||||||
|
@ -4607,7 +4608,7 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
|
|
||||||
/* Remove from project file zones */
|
/* Remove from project file zones */
|
||||||
DB_QueryDELETE ("can not remove files of a course",
|
DB_QueryDELETE ("can not remove files of a course",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod IN %s",
|
" AND Cod IN %s",
|
||||||
(unsigned) Brw_ADMI_DOC_PRJ,
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
@ -4625,20 +4626,22 @@ void Brw_RemoveGrpFilesFromDB (long GrpCod)
|
||||||
DB_QueryDELETE ("can not remove the properties of marks"
|
DB_QueryDELETE ("can not remove the properties of marks"
|
||||||
" associated to a group",
|
" associated to a group",
|
||||||
"DELETE FROM marks_properties"
|
"DELETE FROM marks_properties"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"marks_properties"
|
"marks_properties"
|
||||||
" WHERE files.FileBrowser=%u"
|
" WHERE brw_files.FileBrowser=%u"
|
||||||
" AND files.Cod=%ld"
|
" AND brw_files.Cod=%ld"
|
||||||
" AND files.FilCod=marks_properties.FilCod",
|
" AND brw_files.FilCod=marks_properties.FilCod",
|
||||||
(unsigned) Brw_ADMI_MRK_GRP,
|
(unsigned) Brw_ADMI_MRK_GRP,
|
||||||
GrpCod);
|
GrpCod);
|
||||||
|
|
||||||
/***** Remove from database the entries that store the file views *****/
|
/***** Remove from database the entries that store the file views *****/
|
||||||
DB_QueryDELETE ("can not remove file views to files of a group",
|
DB_QueryDELETE ("can not remove file views to files of a group",
|
||||||
"DELETE FROM file_view USING file_view,files"
|
"DELETE FROM file_view"
|
||||||
" WHERE files.FileBrowser IN (%u,%u,%u,%u)"
|
" USING brw_files,"
|
||||||
" AND files.Cod=%ld"
|
"file_view"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" WHERE brw_files.FileBrowser IN (%u,%u,%u,%u)"
|
||||||
|
" AND brw_files.Cod=%ld"
|
||||||
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) Brw_ADMI_DOC_GRP,
|
(unsigned) Brw_ADMI_DOC_GRP,
|
||||||
(unsigned) Brw_ADMI_TCH_GRP,
|
(unsigned) Brw_ADMI_TCH_GRP,
|
||||||
(unsigned) Brw_ADMI_SHR_GRP,
|
(unsigned) Brw_ADMI_SHR_GRP,
|
||||||
|
@ -4691,9 +4694,9 @@ void Brw_RemoveGrpFilesFromDB (long GrpCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the data files *****/
|
/***** Remove from database the entries that store the data files *****/
|
||||||
DB_QueryDELETE ("can not remove files of a group",
|
DB_QueryDELETE ("can not remove files of a group",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser IN (%u,%u,%u,%u)"
|
" WHERE FileBrowser IN (%u,%u,%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_GRP,
|
(unsigned) Brw_ADMI_DOC_GRP,
|
||||||
(unsigned) Brw_ADMI_TCH_GRP,
|
(unsigned) Brw_ADMI_TCH_GRP,
|
||||||
(unsigned) Brw_ADMI_SHR_GRP,
|
(unsigned) Brw_ADMI_SHR_GRP,
|
||||||
|
@ -4710,11 +4713,11 @@ void Brw_RemovePrjFilesFromDB (long PrjCod)
|
||||||
/***** Remove from database the entries that store the file views *****/
|
/***** Remove from database the entries that store the file views *****/
|
||||||
DB_QueryDELETE ("can not remove file views to files of a project",
|
DB_QueryDELETE ("can not remove file views to files of a project",
|
||||||
"DELETE FROM file_view"
|
"DELETE FROM file_view"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"file_view"
|
"file_view"
|
||||||
" WHERE files.FileBrowser IN (%u,%u)"
|
" WHERE brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.Cod=%ld"
|
" AND brw_files.Cod=%ld"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) Brw_ADMI_DOC_PRJ,
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
(unsigned) Brw_ADMI_ASS_PRJ,
|
(unsigned) Brw_ADMI_ASS_PRJ,
|
||||||
PrjCod);
|
PrjCod);
|
||||||
|
@ -4757,7 +4760,7 @@ void Brw_RemovePrjFilesFromDB (long PrjCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the data files *****/
|
/***** Remove from database the entries that store the data files *****/
|
||||||
DB_QueryDELETE ("can not remove files of a project",
|
DB_QueryDELETE ("can not remove files of a project",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_PRJ,
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
@ -4877,12 +4880,12 @@ void Brw_RemoveWrkFilesFromDB (long CrsCod,long UsrCod)
|
||||||
/***** Remove from database the entries that store the file views *****/
|
/***** Remove from database the entries that store the file views *****/
|
||||||
DB_QueryDELETE ("can not remove file views",
|
DB_QueryDELETE ("can not remove file views",
|
||||||
"DELETE FROM file_view"
|
"DELETE FROM file_view"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"file_view"
|
"file_view"
|
||||||
" WHERE files.FileBrowser IN (%u,%u)"
|
" WHERE brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.Cod=%ld"
|
" AND brw_files.Cod=%ld"
|
||||||
" AND files.ZoneUsrCod=%ld"
|
" AND brw_files.ZoneUsrCod=%ld"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) Brw_ADMI_ASG_USR,
|
(unsigned) Brw_ADMI_ASG_USR,
|
||||||
(unsigned) Brw_ADMI_WRK_USR,
|
(unsigned) Brw_ADMI_WRK_USR,
|
||||||
CrsCod,UsrCod);
|
CrsCod,UsrCod);
|
||||||
|
@ -4919,7 +4922,7 @@ void Brw_RemoveWrkFilesFromDB (long CrsCod,long UsrCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the data files *****/
|
/***** Remove from database the entries that store the data files *****/
|
||||||
DB_QueryDELETE ("can not remove files",
|
DB_QueryDELETE ("can not remove files",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld"
|
" AND Cod=%ld"
|
||||||
" AND ZoneUsrCod=%ld",
|
" AND ZoneUsrCod=%ld",
|
||||||
|
@ -4939,10 +4942,10 @@ void Brw_RemoveUsrFilesFromDB (long UsrCod)
|
||||||
// in order to take into account his/her views
|
// in order to take into account his/her views
|
||||||
DB_QueryDELETE ("can not remove file views to files of a user",
|
DB_QueryDELETE ("can not remove file views to files of a user",
|
||||||
"DELETE FROM file_view"
|
"DELETE FROM file_view"
|
||||||
" USING files,"
|
" USING brw_files,"
|
||||||
"file_view"
|
"file_view"
|
||||||
" WHERE files.ZoneUsrCod=%ld"
|
" WHERE brw_files.ZoneUsrCod=%ld"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
UsrCod);
|
UsrCod);
|
||||||
|
|
||||||
/***** Remove from database expanded folders *****/
|
/***** Remove from database expanded folders *****/
|
||||||
|
@ -4971,7 +4974,7 @@ void Brw_RemoveUsrFilesFromDB (long UsrCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the data files *****/
|
/***** Remove from database the entries that store the data files *****/
|
||||||
DB_QueryDELETE ("can not remove files in user's file zones",
|
DB_QueryDELETE ("can not remove files in user's file zones",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE ZoneUsrCod=%ld",
|
" WHERE ZoneUsrCod=%ld",
|
||||||
UsrCod);
|
UsrCod);
|
||||||
}
|
}
|
||||||
|
@ -9363,9 +9366,12 @@ bool Brw_CheckIfFileOrFolderIsSetAsHiddenInDB (Brw_FileType_t FileType,const cha
|
||||||
|
|
||||||
/***** Get if a file or folder is hidden from database *****/
|
/***** Get if a file or folder is hidden from database *****/
|
||||||
if (DB_QuerySELECT (&mysql_res,"can not check if a file is hidden",
|
if (DB_QuerySELECT (&mysql_res,"can not check if a file is hidden",
|
||||||
"SELECT Hidden FROM files"
|
"SELECT Hidden" // row[0]
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
" FROM brw_files" // row[1]
|
||||||
" AND Path='%s'",
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path='%s'",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,ZoneUsrCod,
|
Cod,ZoneUsrCod,
|
||||||
Path))
|
Path))
|
||||||
|
@ -9400,10 +9406,12 @@ bool Brw_CheckIfFileOrFolderIsHidden (struct FileMetadata *FileMetadata)
|
||||||
2) the argument Path begins by 'x/', where x is a path stored in database
|
2) the argument Path begins by 'x/', where x is a path stored in database
|
||||||
*/
|
*/
|
||||||
return (DB_QueryCOUNT ("can not check if a file or folder is hidden",
|
return (DB_QueryCOUNT ("can not check if a file or folder is hidden",
|
||||||
"SELECT COUNT(*) FROM files"
|
"SELECT COUNT(*) FROM brw_files"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
" WHERE FileBrowser=%u"
|
||||||
" AND Hidden='Y'"
|
" AND Cod=%ld"
|
||||||
" AND (Path='%s' OR LOCATE(CONCAT(Path,'/'),'%s')=1)",
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Hidden='Y'"
|
||||||
|
" AND (Path='%s' OR LOCATE(CONCAT(Path,'/'),'%s')=1)",
|
||||||
FileMetadata->FileBrowser,
|
FileMetadata->FileBrowser,
|
||||||
FileMetadata->Cod,
|
FileMetadata->Cod,
|
||||||
FileMetadata->ZoneUsrCod,
|
FileMetadata->ZoneUsrCod,
|
||||||
|
@ -10355,9 +10363,12 @@ long Brw_GetFilCodByPath (const char *Path,bool OnlyIfPublic)
|
||||||
|
|
||||||
/***** Get code of a file from database *****/
|
/***** Get code of a file from database *****/
|
||||||
if (DB_QuerySELECT (&mysql_res,"can not get file code",
|
if (DB_QuerySELECT (&mysql_res,"can not get file code",
|
||||||
"SELECT FilCod FROM files"
|
"SELECT FilCod"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
" FROM brw_files"
|
||||||
" AND Path='%s'%s",
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path='%s'%s",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,ZoneUsrCod,
|
Cod,ZoneUsrCod,
|
||||||
Path,
|
Path,
|
||||||
|
@ -10395,11 +10406,21 @@ void Brw_GetFileMetadataByPath (struct FileMetadata *FileMetadata)
|
||||||
|
|
||||||
/***** Get metadata of a file from database *****/
|
/***** Get metadata of a file from database *****/
|
||||||
if (DB_QuerySELECT (&mysql_res,"can not get file metadata",
|
if (DB_QuerySELECT (&mysql_res,"can not get file metadata",
|
||||||
"SELECT FilCod,FileBrowser,Cod,ZoneUsrCod,"
|
"SELECT FilCod," // row[0]
|
||||||
"PublisherUsrCod,FileType,Path,Hidden,Public,License"
|
"FileBrowser," // row[1]
|
||||||
" FROM files"
|
"Cod," // row[2]
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
"ZoneUsrCod," // row[3]
|
||||||
" AND Path='%s'",
|
"PublisherUsrCod," // row[4]
|
||||||
|
"FileType," // row[5]
|
||||||
|
"Path," // row[6]
|
||||||
|
"Hidden," // row[7]
|
||||||
|
"Public," // row[8]
|
||||||
|
"License" // row[9]
|
||||||
|
" FROM brw_files"
|
||||||
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path='%s'",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,ZoneUsrCod,
|
Cod,ZoneUsrCod,
|
||||||
Gbl.FileBrowser.FilFolLnk.Full))
|
Gbl.FileBrowser.FilFolLnk.Full))
|
||||||
|
@ -10527,9 +10548,17 @@ void Brw_GetFileMetadataByCod (struct FileMetadata *FileMetadata)
|
||||||
|
|
||||||
/***** Get metadata of a file from database *****/
|
/***** Get metadata of a file from database *****/
|
||||||
if (DB_QuerySELECT (&mysql_res,"can not get file metadata",
|
if (DB_QuerySELECT (&mysql_res,"can not get file metadata",
|
||||||
"SELECT FilCod,FileBrowser,Cod,ZoneUsrCod,"
|
"SELECT FilCod," // row[0]
|
||||||
"PublisherUsrCod,FileType,Path,Hidden,Public,License"
|
"FileBrowser," // row[1]
|
||||||
" FROM files"
|
"Cod," // row[2]
|
||||||
|
"ZoneUsrCod," // row[3]
|
||||||
|
"PublisherUsrCod," // row[4]
|
||||||
|
"FileType," // row[5]
|
||||||
|
"Path," // row[6]
|
||||||
|
"Hidden," // row[7]
|
||||||
|
"Public," // row[8]
|
||||||
|
"License" // row[9]
|
||||||
|
" FROM brw_files"
|
||||||
" WHERE FilCod=%ld",
|
" WHERE FilCod=%ld",
|
||||||
FileMetadata->FilCod))
|
FileMetadata->FilCod))
|
||||||
{
|
{
|
||||||
|
@ -10908,9 +10937,13 @@ static bool Brw_GetIfFolderHasPublicFiles (const char Path[PATH_MAX + 1])
|
||||||
|
|
||||||
/***** Get if a file or folder is public from database *****/
|
/***** Get if a file or folder is public from database *****/
|
||||||
return (DB_QueryCOUNT ("can not check if a folder contains public files",
|
return (DB_QueryCOUNT ("can not check if a folder contains public files",
|
||||||
"SELECT COUNT(*) FROM files"
|
"SELECT COUNT(*)"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
" FROM brw_files"
|
||||||
" AND Path LIKE '%s/%%' AND Public='Y'",
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path LIKE '%s/%%'"
|
||||||
|
" AND Public='Y'",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,ZoneUsrCod,
|
Cod,ZoneUsrCod,
|
||||||
Path) != 0);
|
Path) != 0);
|
||||||
|
@ -10925,9 +10958,10 @@ unsigned Brw_GetNumFilesUsr (long UsrCod)
|
||||||
/***** Get current number of files published by a user from database *****/
|
/***** Get current number of files published by a user from database *****/
|
||||||
return
|
return
|
||||||
(unsigned) DB_QueryCOUNT ("can not get number of files from a user",
|
(unsigned) DB_QueryCOUNT ("can not get number of files from a user",
|
||||||
"SELECT COUNT(*) FROM files"
|
"SELECT COUNT(*)"
|
||||||
|
" FROM brw_files"
|
||||||
" WHERE PublisherUsrCod=%ld"
|
" WHERE PublisherUsrCod=%ld"
|
||||||
" AND FileType IN (%u,%u)",
|
" AND FileType IN (%u,%u)",
|
||||||
UsrCod,
|
UsrCod,
|
||||||
(unsigned) Brw_IS_FILE,
|
(unsigned) Brw_IS_FILE,
|
||||||
(unsigned) Brw_IS_UNKNOWN); // Unknown entries are counted as files
|
(unsigned) Brw_IS_UNKNOWN); // Unknown entries are counted as files
|
||||||
|
@ -10942,10 +10976,11 @@ unsigned Brw_GetNumPublicFilesUsr (long UsrCod)
|
||||||
/***** Get current number of public files published by a user from database *****/
|
/***** Get current number of public files published by a user from database *****/
|
||||||
return
|
return
|
||||||
(unsigned) DB_QueryCOUNT ("can not get number of public files from a user",
|
(unsigned) DB_QueryCOUNT ("can not get number of public files from a user",
|
||||||
"SELECT COUNT(*) FROM files"
|
"SELECT COUNT(*)"
|
||||||
|
" FROM brw_files"
|
||||||
" WHERE PublisherUsrCod=%ld"
|
" WHERE PublisherUsrCod=%ld"
|
||||||
" AND FileType IN (%u,%u)"
|
" AND FileType IN (%u,%u)"
|
||||||
" AND Public='Y'",
|
" AND Public='Y'",
|
||||||
UsrCod,
|
UsrCod,
|
||||||
(unsigned) Brw_IS_FILE,
|
(unsigned) Brw_IS_FILE,
|
||||||
(unsigned) Brw_IS_UNKNOWN); // Unknown entries are counted as files
|
(unsigned) Brw_IS_UNKNOWN); // Unknown entries are counted as files
|
||||||
|
@ -10962,9 +10997,12 @@ static void Brw_ChangeFileOrFolderHiddenInDB (const char Path[PATH_MAX + 1],bool
|
||||||
|
|
||||||
/***** Mark file as hidden in database *****/
|
/***** Mark file as hidden in database *****/
|
||||||
DB_QueryUPDATE ("can not change status of a file in database",
|
DB_QueryUPDATE ("can not change status of a file in database",
|
||||||
"UPDATE files SET Hidden='%c'"
|
"UPDATE brw_files"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
" SET Hidden='%c'"
|
||||||
" AND Path='%s'",
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path='%s'",
|
||||||
IsHidden ? 'Y' :
|
IsHidden ? 'Y' :
|
||||||
'N',
|
'N',
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
|
@ -10988,9 +11026,14 @@ static void Brw_ChangeFilePublicInDB (struct FileMetadata *FileMetadata,
|
||||||
|
|
||||||
/***** Change publisher, public and license of file in database *****/
|
/***** Change publisher, public and license of file in database *****/
|
||||||
DB_QueryUPDATE ("can not change metadata of a file in database",
|
DB_QueryUPDATE ("can not change metadata of a file in database",
|
||||||
"UPDATE files SET Public='%c',License=%u"
|
"UPDATE brw_files"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
" SET Public='%c',"
|
||||||
" AND FilCod=%ld AND Path='%s'",
|
"License=%u"
|
||||||
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND FilCod=%ld"
|
||||||
|
" AND Path='%s'",
|
||||||
IsPublic ? 'Y' :
|
IsPublic ? 'Y' :
|
||||||
'N',
|
'N',
|
||||||
(unsigned) License,
|
(unsigned) License,
|
||||||
|
@ -11169,7 +11212,7 @@ long Brw_AddPathToDB (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||||
/***** Add path to the database *****/
|
/***** Add path to the database *****/
|
||||||
return
|
return
|
||||||
DB_QueryINSERTandReturnCode ("can not add path to database",
|
DB_QueryINSERTandReturnCode ("can not add path to database",
|
||||||
"INSERT INTO files"
|
"INSERT INTO brw_files"
|
||||||
" (FileBrowser,Cod,ZoneUsrCod,"
|
" (FileBrowser,Cod,ZoneUsrCod,"
|
||||||
"PublisherUsrCod,FileType,Path,Hidden,Public,License)"
|
"PublisherUsrCod,FileType,Path,Hidden,Public,License)"
|
||||||
" VALUES"
|
" VALUES"
|
||||||
|
@ -11206,26 +11249,33 @@ static void Brw_RemoveOneFileOrFolderFromDB (const char Path[PATH_MAX + 1])
|
||||||
FileBrowser == Brw_ADMI_MRK_GRP)
|
FileBrowser == Brw_ADMI_MRK_GRP)
|
||||||
DB_QueryDELETE ("can not remove properties of marks from database",
|
DB_QueryDELETE ("can not remove properties of marks from database",
|
||||||
"DELETE FROM marks_properties"
|
"DELETE FROM marks_properties"
|
||||||
" USING files,marks_properties"
|
" USING brw_files,"
|
||||||
" WHERE files.FileBrowser=%u AND files.Cod=%ld"
|
"marks_properties"
|
||||||
" AND files.Path='%s'"
|
" WHERE brw_files.FileBrowser=%u"
|
||||||
" AND files.FilCod=marks_properties.FilCod",
|
" AND brw_files.Cod=%ld"
|
||||||
|
" AND brw_files.Path='%s'"
|
||||||
|
" AND brw_files.FilCod=marks_properties.FilCod",
|
||||||
(unsigned) FileBrowser,Cod,Path);
|
(unsigned) FileBrowser,Cod,Path);
|
||||||
|
|
||||||
/***** Remove from database the entries that store the file views *****/
|
/***** Remove from database the entries that store the file views *****/
|
||||||
DB_QueryDELETE ("can not remove file views from database",
|
DB_QueryDELETE ("can not remove file views from database",
|
||||||
"DELETE FROM file_view USING file_view,files"
|
"DELETE FROM file_view"
|
||||||
" WHERE files.FileBrowser=%u AND files.Cod=%ld"
|
" USING brw_files,"
|
||||||
" AND files.ZoneUsrCod=%ld"
|
"file_view"
|
||||||
" AND files.Path='%s'"
|
" WHERE brw_files.FileBrowser=%u"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.Cod=%ld"
|
||||||
|
" AND brw_files.ZoneUsrCod=%ld"
|
||||||
|
" AND brw_files.Path='%s'"
|
||||||
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
||||||
|
|
||||||
/***** Remove from database the entry that stores the data of a file *****/
|
/***** Remove from database the entry that stores the data of a file *****/
|
||||||
DB_QueryDELETE ("can not remove path from database",
|
DB_QueryDELETE ("can not remove path from database",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
" WHERE FileBrowser=%u"
|
||||||
" AND Path='%s'",
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path='%s'",
|
||||||
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11250,26 +11300,33 @@ static void Brw_RemoveChildrenOfFolderFromDB (const char Path[PATH_MAX + 1])
|
||||||
FileBrowser == Brw_ADMI_MRK_GRP)
|
FileBrowser == Brw_ADMI_MRK_GRP)
|
||||||
DB_QueryDELETE ("can not remove properties of marks from database",
|
DB_QueryDELETE ("can not remove properties of marks from database",
|
||||||
"DELETE FROM marks_properties"
|
"DELETE FROM marks_properties"
|
||||||
" USING files,marks_properties"
|
" USING brw_files,"
|
||||||
" WHERE files.FileBrowser=%u AND files.Cod=%ld"
|
"marks_properties"
|
||||||
" AND files.Path LIKE '%s/%%'"
|
" WHERE brw_files.FileBrowser=%u"
|
||||||
" AND files.FilCod=marks_properties.FilCod",
|
" AND brw_files.Cod=%ld"
|
||||||
|
" AND brw_files.Path LIKE '%s/%%'"
|
||||||
|
" AND brw_files.FilCod=marks_properties.FilCod",
|
||||||
(unsigned) FileBrowser,Cod,Path);
|
(unsigned) FileBrowser,Cod,Path);
|
||||||
|
|
||||||
/***** Remove from database the entries that store the file views *****/
|
/***** Remove from database the entries that store the file views *****/
|
||||||
DB_QueryDELETE ("can not remove file views from database",
|
DB_QueryDELETE ("can not remove file views from database",
|
||||||
"DELETE FROM file_view USING file_view,files"
|
"DELETE FROM file_view"
|
||||||
" WHERE files.FileBrowser=%u AND files.Cod=%ld"
|
" USING brw_files,"
|
||||||
" AND files.ZoneUsrCod=%ld"
|
"file_view"
|
||||||
" AND files.Path LIKE '%s/%%'"
|
" WHERE brw_files.FileBrowser=%u"
|
||||||
" AND files.FilCod=file_view.FilCod",
|
" AND brw_files.Cod=%ld"
|
||||||
|
" AND brw_files.ZoneUsrCod=%ld"
|
||||||
|
" AND brw_files.Path LIKE '%s/%%'"
|
||||||
|
" AND brw_files.FilCod=file_view.FilCod",
|
||||||
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
||||||
|
|
||||||
/***** Remove from database the entries that store the data of files *****/
|
/***** Remove from database the entries that store the data of files *****/
|
||||||
DB_QueryDELETE ("can not remove paths from database",
|
DB_QueryDELETE ("can not remove paths from database",
|
||||||
"DELETE FROM files"
|
"DELETE FROM brw_files"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
" WHERE FileBrowser=%u"
|
||||||
" AND Path LIKE '%s/%%'",
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path LIKE '%s/%%'",
|
||||||
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11285,8 +11342,12 @@ static void Brw_RenameOneFolderInDB (const char OldPath[PATH_MAX + 1],
|
||||||
|
|
||||||
/***** Update file or folder in table of common files *****/
|
/***** Update file or folder in table of common files *****/
|
||||||
DB_QueryUPDATE ("can not update folder name in a common zone",
|
DB_QueryUPDATE ("can not update folder name in a common zone",
|
||||||
"UPDATE files SET Path='%s'"
|
"UPDATE brw_files"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld AND Path='%s'",
|
" SET Path='%s'"
|
||||||
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path='%s'",
|
||||||
NewPath,
|
NewPath,
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,ZoneUsrCod,
|
Cod,ZoneUsrCod,
|
||||||
|
@ -11306,9 +11367,12 @@ static void Brw_RenameChildrenFilesOrFoldersInDB (const char OldPath[PATH_MAX +
|
||||||
|
|
||||||
/***** Update children of a folder in table of files *****/
|
/***** Update children of a folder in table of files *****/
|
||||||
DB_QueryUPDATE ("can not rename file or folder names in a common zone",
|
DB_QueryUPDATE ("can not rename file or folder names in a common zone",
|
||||||
"UPDATE files SET Path=CONCAT('%s','/',SUBSTRING(Path,%u))"
|
"UPDATE brw_files"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld AND ZoneUsrCod=%ld"
|
" SET Path=CONCAT('%s','/',SUBSTRING(Path,%u))"
|
||||||
" AND Path LIKE '%s/%%'",
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path LIKE '%s/%%'",
|
||||||
NewPath,StartFinalSubpathNotChanged,
|
NewPath,StartFinalSubpathNotChanged,
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,ZoneUsrCod,
|
Cod,ZoneUsrCod,
|
||||||
|
@ -11662,9 +11726,11 @@ static long Brw_GetPublisherOfSubtree (void)
|
||||||
/***** Get all common files that are equal to full path (including filename)
|
/***** Get all common files that are equal to full path (including filename)
|
||||||
or that are under that full path from database *****/
|
or that are under that full path from database *****/
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get publishers of files",
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get publishers of files",
|
||||||
"SELECT DISTINCT(PublisherUsrCod) FROM files"
|
"SELECT DISTINCT(PublisherUsrCod)"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld"
|
" FROM brw_files"
|
||||||
" AND (Path='%s' OR Path LIKE '%s/%%')",
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND (Path='%s' OR Path LIKE '%s/%%')",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
Gbl.FileBrowser.FilFolLnk.Full,
|
Gbl.FileBrowser.FilFolLnk.Full,
|
||||||
|
|
40
swad_mark.c
40
swad_mark.c
|
@ -177,13 +177,16 @@ static void Mrk_GetNumRowsHeaderAndFooter (struct MarksProperties *Marks)
|
||||||
get the number of rows of the more recent file. */
|
get the number of rows of the more recent file. */
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get the number of rows"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get the number of rows"
|
||||||
" in header and footer",
|
" in header and footer",
|
||||||
"SELECT marks_properties.%s,marks_properties.%s"
|
"SELECT marks_properties.%s," // row[0]
|
||||||
" FROM files,marks_properties"
|
"marks_properties.%s" // row[1]
|
||||||
" WHERE files.FileBrowser=%u"
|
" FROM brw_files,"
|
||||||
" AND files.Cod=%ld"
|
"marks_properties"
|
||||||
" AND files.Path='%s'"
|
" WHERE brw_files.FileBrowser=%u"
|
||||||
" AND files.FilCod=marks_properties.FilCod"
|
" AND brw_files.Cod=%ld"
|
||||||
" ORDER BY files.FilCod DESC LIMIT 1", // On duplicate entries, get the more recent
|
" AND brw_files.Path='%s'"
|
||||||
|
" AND brw_files.FilCod=marks_properties.FilCod"
|
||||||
|
" ORDER BY brw_files.FilCod DESC"
|
||||||
|
" LIMIT 1", // On duplicate entries, get the more recent
|
||||||
Mrk_HeadOrFootStr[Brw_HEADER],
|
Mrk_HeadOrFootStr[Brw_HEADER],
|
||||||
Mrk_HeadOrFootStr[Brw_FOOTER],
|
Mrk_HeadOrFootStr[Brw_FOOTER],
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
|
@ -252,10 +255,13 @@ static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
||||||
/***** Update properties of marks in the database *****/
|
/***** Update properties of marks in the database *****/
|
||||||
Cod = Brw_GetCodForFiles ();
|
Cod = Brw_GetCodForFiles ();
|
||||||
DB_QueryUPDATE ("can not update properties of marks",
|
DB_QueryUPDATE ("can not update properties of marks",
|
||||||
"UPDATE marks_properties,files"
|
"UPDATE marks_properties,"
|
||||||
|
"brw_files"
|
||||||
" SET marks_properties.%s=%u"
|
" SET marks_properties.%s=%u"
|
||||||
" WHERE files.FileBrowser=%u AND files.Cod=%ld AND files.Path='%s'"
|
" WHERE brw_files.FileBrowser=%u"
|
||||||
" AND files.FilCod=marks_properties.FilCod",
|
" AND brw_files.Cod=%ld"
|
||||||
|
" AND brw_files.Path='%s'"
|
||||||
|
" AND brw_files.FilCod=marks_properties.FilCod",
|
||||||
Mrk_HeadOrFootStr[HeaderOrFooter],NumRows,
|
Mrk_HeadOrFootStr[HeaderOrFooter],NumRows,
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
|
@ -723,11 +729,15 @@ void Mrk_GetNotifMyMarks (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||||
/***** Get subject of message from database *****/
|
/***** Get subject of message from database *****/
|
||||||
if (DB_QuerySELECT (&mysql_res,"can not get the number of rows"
|
if (DB_QuerySELECT (&mysql_res,"can not get the number of rows"
|
||||||
" in header and footer",
|
" in header and footer",
|
||||||
"SELECT files.FileBrowser,files.Cod,files.Path,"
|
"SELECT brw_files.FileBrowser,"
|
||||||
"marks_properties.Header,marks_properties.Footer"
|
"brw_files.Cod,"
|
||||||
" FROM files,marks_properties"
|
"brw_files.Path,"
|
||||||
" WHERE files.FilCod=%ld"
|
"marks_properties.Header,"
|
||||||
" AND files.FilCod=marks_properties.FilCod",
|
"marks_properties.Footer"
|
||||||
|
" FROM brw_files,"
|
||||||
|
"marks_properties"
|
||||||
|
" WHERE brw_files.FilCod=%ld"
|
||||||
|
" AND brw_files.FilCod=marks_properties.FilCod",
|
||||||
MrkCod) == 1) // Result should have a unique row
|
MrkCod) == 1) // Result should have a unique row
|
||||||
{
|
{
|
||||||
/***** Get data of this file of marks *****/
|
/***** Get data of this file of marks *****/
|
||||||
|
|
|
@ -1101,11 +1101,15 @@ void Ntf_MarkNotifChildrenOfFolderAsRemoved (const char *Path)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DB_QueryUPDATE ("can not set notification(s) as removed",
|
DB_QueryUPDATE ("can not set notification(s) as removed",
|
||||||
"UPDATE notif SET Status=(Status | %u)"
|
"UPDATE notif"
|
||||||
" WHERE NotifyEvent=%u AND Cod IN"
|
" SET Status=(Status | %u)"
|
||||||
" (SELECT FilCod FROM files"
|
" WHERE NotifyEvent=%u"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld"
|
" AND Cod IN"
|
||||||
" AND Path LIKE '%s/%%')",
|
" (SELECT FilCod"
|
||||||
|
" FROM brw_files"
|
||||||
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND Path LIKE '%s/%%')",
|
||||||
(unsigned) Ntf_STATUS_BIT_REMOVED,
|
(unsigned) Ntf_STATUS_BIT_REMOVED,
|
||||||
(unsigned) NotifyEvent,
|
(unsigned) NotifyEvent,
|
||||||
(unsigned) FileBrowser,Cod,
|
(unsigned) FileBrowser,Cod,
|
||||||
|
@ -1124,10 +1128,14 @@ void Ntf_MarkNotifFilesInGroupAsRemoved (long GrpCod)
|
||||||
{
|
{
|
||||||
/***** Set notifications as removed *****/
|
/***** Set notifications as removed *****/
|
||||||
DB_QueryUPDATE ("can not set notification(s) as removed",
|
DB_QueryUPDATE ("can not set notification(s) as removed",
|
||||||
"UPDATE notif SET Status=(Status | %u)"
|
"UPDATE notif"
|
||||||
" WHERE NotifyEvent IN (%u,%u,%u,%u) AND Cod IN"
|
" SET Status=(Status | %u)"
|
||||||
" (SELECT FilCod FROM files"
|
" WHERE NotifyEvent IN (%u,%u,%u,%u)"
|
||||||
" WHERE FileBrowser IN (%u,%u,%u,%u) AND Cod=%ld)",
|
" AND Cod IN"
|
||||||
|
" (SELECT FilCod"
|
||||||
|
" FROM brw_files"
|
||||||
|
" WHERE FileBrowser IN (%u,%u,%u,%u)"
|
||||||
|
" AND Cod=%ld)",
|
||||||
(unsigned) Ntf_STATUS_BIT_REMOVED,
|
(unsigned) Ntf_STATUS_BIT_REMOVED,
|
||||||
(unsigned) Ntf_EVENT_DOCUMENT_FILE,
|
(unsigned) Ntf_EVENT_DOCUMENT_FILE,
|
||||||
(unsigned) Ntf_EVENT_TEACHERS_FILE,
|
(unsigned) Ntf_EVENT_TEACHERS_FILE,
|
||||||
|
|
383
swad_search.c
383
swad_search.c
|
@ -703,8 +703,8 @@ static unsigned Sch_SearchOpenDocumentsInDB (const char *RangeQuery)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get files",
|
DB_QuerySELECT (&mysql_res,"can not get files",
|
||||||
"SELECT * FROM "
|
"SELECT * FROM "
|
||||||
"("
|
"("
|
||||||
"SELECT files.FilCod," // Institution
|
"SELECT brw_files.FilCod," // Institution
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"-1 AS CtrCod,"
|
"-1 AS CtrCod,"
|
||||||
|
@ -714,20 +714,21 @@ static unsigned Sch_SearchOpenDocumentsInDB (const char *RangeQuery)
|
||||||
"-1 AS CrsCod,"
|
"-1 AS CrsCod,"
|
||||||
"'' AS CrsShortName,"
|
"'' AS CrsShortName,"
|
||||||
"-1 AS GrpCod"
|
"-1 AS GrpCod"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.Public='Y' AND %s"
|
" WHERE brw_files.Public='Y'"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND %s"
|
||||||
" AND files.Cod=ins_instits.InsCod"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND brw_files.Cod=ins_instits.InsCod"
|
||||||
"%s"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
|
"%s"
|
||||||
" UNION "
|
" UNION "
|
||||||
"SELECT files.FilCod," // Center
|
"SELECT brw_files.FilCod," // Center
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"ctr_centers.CtrCod,"
|
"ctr_centers.CtrCod,"
|
||||||
|
@ -737,21 +738,21 @@ static unsigned Sch_SearchOpenDocumentsInDB (const char *RangeQuery)
|
||||||
"-1 AS CrsCod,"
|
"-1 AS CrsCod,"
|
||||||
"'' AS CrsShortName,"
|
"'' AS CrsShortName,"
|
||||||
"-1 AS GrpCod"
|
"-1 AS GrpCod"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.Public='Y' AND %s"
|
" WHERE brw_files.Public='Y' AND %s"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.Cod=ctr_centers.CtrCod"
|
" AND brw_files.Cod=ctr_centers.CtrCod"
|
||||||
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
"%s"
|
"%s"
|
||||||
" UNION "
|
" UNION "
|
||||||
"SELECT files.FilCod," // Degree
|
"SELECT brw_files.FilCod," // Degree
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"ctr_centers.CtrCod,"
|
"ctr_centers.CtrCod,"
|
||||||
|
@ -760,22 +761,22 @@ static unsigned Sch_SearchOpenDocumentsInDB (const char *RangeQuery)
|
||||||
"deg_degrees.ShortName AS DegShortName,"
|
"deg_degrees.ShortName AS DegShortName,"
|
||||||
"-1,'' AS CrsShortName,"
|
"-1,'' AS CrsShortName,"
|
||||||
"-1"
|
"-1"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.Public='Y' AND %s"
|
" WHERE brw_files.Public='Y' AND %s"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.Cod=deg_degrees.DegCod"
|
" AND brw_files.Cod=deg_degrees.DegCod"
|
||||||
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
||||||
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
"%s"
|
"%s"
|
||||||
" UNION "
|
" UNION "
|
||||||
"SELECT files.FilCod," // Course
|
"SELECT brw_files.FilCod," // Course
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"ctr_centers.CtrCod,"
|
"ctr_centers.CtrCod,"
|
||||||
|
@ -785,20 +786,20 @@ static unsigned Sch_SearchOpenDocumentsInDB (const char *RangeQuery)
|
||||||
"crs_courses.CrsCod,"
|
"crs_courses.CrsCod,"
|
||||||
"crs_courses.ShortName AS CrsShortName,"
|
"crs_courses.ShortName AS CrsShortName,"
|
||||||
"-1"
|
"-1"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.Public='Y' AND %s"
|
" WHERE brw_files.Public='Y' AND %s"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.Cod=crs_courses.CrsCod"
|
" AND brw_files.Cod=crs_courses.CrsCod"
|
||||||
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
||||||
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
||||||
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
"%s"
|
"%s"
|
||||||
") AS selected_files"
|
") AS selected_files"
|
||||||
" WHERE PathFromRoot<>''"
|
" WHERE PathFromRoot<>''"
|
||||||
" ORDER BY InsShortName,"
|
" ORDER BY InsShortName,"
|
||||||
|
@ -849,7 +850,7 @@ static unsigned Sch_SearchDocumentsInMyCoursesInDB (const char *RangeQuery)
|
||||||
/***** Check user's permission *****/
|
/***** Check user's permission *****/
|
||||||
if (Sch_CheckIfIHavePermissionToSearch (Sch_SEARCH_DOCUM_IN_MY_COURSES))
|
if (Sch_CheckIfIHavePermissionToSearch (Sch_SEARCH_DOCUM_IN_MY_COURSES))
|
||||||
/***** Split document string into words *****/
|
/***** Split document string into words *****/
|
||||||
if (Sch_BuildSearchQuery (SearchQuery,"SUBSTRING_INDEX(files.Path,'/',-1)",
|
if (Sch_BuildSearchQuery (SearchQuery,"SUBSTRING_INDEX(brw_files.Path,'/',-1)",
|
||||||
"_latin1 "," COLLATE latin1_general_ci"))
|
"_latin1 "," COLLATE latin1_general_ci"))
|
||||||
{
|
{
|
||||||
/***** Create temporary table with codes of files in documents and shared areas accessible by me.
|
/***** Create temporary table with codes of files in documents and shared areas accessible by me.
|
||||||
|
@ -861,10 +862,12 @@ static unsigned Sch_SearchDocumentsInMyCoursesInDB (const char *RangeQuery)
|
||||||
"CREATE TEMPORARY TABLE my_files_crs"
|
"CREATE TEMPORARY TABLE my_files_crs"
|
||||||
" (FilCod INT NOT NULL,UNIQUE INDEX(FilCod))"
|
" (FilCod INT NOT NULL,UNIQUE INDEX(FilCod))"
|
||||||
" ENGINE=MEMORY"
|
" ENGINE=MEMORY"
|
||||||
" SELECT files.FilCod FROM crs_usr,files"
|
" SELECT brw_files.FilCod"
|
||||||
" WHERE crs_usr.UsrCod=%ld"
|
" FROM crs_usr,"
|
||||||
" AND crs_usr.CrsCod=files.Cod"
|
"brw_files"
|
||||||
" AND files.FileBrowser IN (%u,%u,%u,%u)",
|
" WHERE crs_usr.UsrCod=%ld"
|
||||||
|
" AND crs_usr.CrsCod=brw_files.Cod"
|
||||||
|
" AND brw_files.FileBrowser IN (%u,%u,%u,%u)",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
(unsigned) Brw_ADMI_DOC_CRS,
|
(unsigned) Brw_ADMI_DOC_CRS,
|
||||||
(unsigned) Brw_ADMI_TCH_CRS,
|
(unsigned) Brw_ADMI_TCH_CRS,
|
||||||
|
@ -875,10 +878,11 @@ static unsigned Sch_SearchDocumentsInMyCoursesInDB (const char *RangeQuery)
|
||||||
"CREATE TEMPORARY TABLE my_files_grp"
|
"CREATE TEMPORARY TABLE my_files_grp"
|
||||||
" (FilCod INT NOT NULL,UNIQUE INDEX(FilCod))"
|
" (FilCod INT NOT NULL,UNIQUE INDEX(FilCod))"
|
||||||
" ENGINE=MEMORY"
|
" ENGINE=MEMORY"
|
||||||
" SELECT files.FilCod FROM crs_grp_usr,files"
|
" SELECT brw_files.FilCod"
|
||||||
" WHERE crs_grp_usr.UsrCod=%ld"
|
" FROM crs_grp_usr,brw_files"
|
||||||
" AND crs_grp_usr.GrpCod=files.Cod"
|
" WHERE crs_grp_usr.UsrCod=%ld"
|
||||||
" AND files.FileBrowser IN (%u,%u,%u,%u)",
|
" AND crs_grp_usr.GrpCod=brw_files.Cod"
|
||||||
|
" AND brw_files.FileBrowser IN (%u,%u,%u,%u)",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
(unsigned) Brw_ADMI_DOC_GRP,
|
(unsigned) Brw_ADMI_DOC_GRP,
|
||||||
(unsigned) Brw_ADMI_TCH_GRP,
|
(unsigned) Brw_ADMI_TCH_GRP,
|
||||||
|
@ -890,8 +894,8 @@ static unsigned Sch_SearchDocumentsInMyCoursesInDB (const char *RangeQuery)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get files",
|
DB_QuerySELECT (&mysql_res,"can not get files",
|
||||||
"SELECT * FROM "
|
"SELECT * FROM "
|
||||||
"("
|
"("
|
||||||
"SELECT files.FilCod,"
|
"SELECT brw_files.FilCod,"
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"ctr_centers.CtrCod,"
|
"ctr_centers.CtrCod,"
|
||||||
|
@ -901,23 +905,24 @@ static unsigned Sch_SearchDocumentsInMyCoursesInDB (const char *RangeQuery)
|
||||||
"crs_courses.CrsCod,"
|
"crs_courses.CrsCod,"
|
||||||
"crs_courses.ShortName AS CrsShortName,"
|
"crs_courses.ShortName AS CrsShortName,"
|
||||||
"-1 AS GrpCod"
|
"-1 AS GrpCod"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.FilCod IN (SELECT FilCod FROM my_files_crs) AND %s"
|
" WHERE brw_files.FilCod IN (SELECT FilCod FROM my_files_crs)"
|
||||||
" AND files.FileBrowser IN (%u,%u,%u,%u)"
|
" AND %s"
|
||||||
" AND files.Cod=crs_courses.CrsCod"
|
" AND brw_files.FileBrowser IN (%u,%u,%u,%u)"
|
||||||
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
" AND brw_files.Cod=crs_courses.CrsCod"
|
||||||
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
||||||
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
||||||
"%s"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
|
"%s"
|
||||||
" UNION "
|
" UNION "
|
||||||
"SELECT files.FilCod,"
|
"SELECT brw_files.FilCod,"
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"ctr_centers.CtrCod,"
|
"ctr_centers.CtrCod,"
|
||||||
|
@ -927,24 +932,25 @@ static unsigned Sch_SearchDocumentsInMyCoursesInDB (const char *RangeQuery)
|
||||||
"crs_courses.CrsCod,"
|
"crs_courses.CrsCod,"
|
||||||
"crs_courses.ShortName AS CrsShortName,"
|
"crs_courses.ShortName AS CrsShortName,"
|
||||||
"crs_grp.GrpCod"
|
"crs_grp.GrpCod"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_grp,"
|
"crs_grp,"
|
||||||
"crs_grp_types,"
|
"crs_grp_types,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.FilCod IN (SELECT FilCod FROM my_files_grp) AND %s"
|
" WHERE brw_files.FilCod IN (SELECT FilCod FROM my_files_grp)"
|
||||||
" AND files.FileBrowser IN (%u,%u,%u,%u)"
|
" AND %s"
|
||||||
" AND files.Cod=crs_grp.GrpCod"
|
" AND brw_files.FileBrowser IN (%u,%u,%u,%u)"
|
||||||
" AND crs_grp.GrpTypCod=crs_grp_types.GrpTypCod"
|
" AND brw_files.Cod=crs_grp.GrpCod"
|
||||||
" AND crs_grp_types.CrsCod=crs_courses.CrsCod"
|
" AND crs_grp.GrpTypCod=crs_grp_types.GrpTypCod"
|
||||||
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
" AND crs_grp_types.CrsCod=crs_courses.CrsCod"
|
||||||
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
||||||
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
||||||
"%s"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
|
"%s"
|
||||||
") AS selected_files"
|
") AS selected_files"
|
||||||
" WHERE PathFromRoot<>''"
|
" WHERE PathFromRoot<>''"
|
||||||
" ORDER BY InsShortName,"
|
" ORDER BY InsShortName,"
|
||||||
|
@ -995,7 +1001,7 @@ static unsigned Sch_SearchMyDocumentsInDB (const char *RangeQuery)
|
||||||
/***** Check user's permission *****/
|
/***** Check user's permission *****/
|
||||||
if (Sch_CheckIfIHavePermissionToSearch (Sch_SEARCH_MY_DOCUMENTS))
|
if (Sch_CheckIfIHavePermissionToSearch (Sch_SEARCH_MY_DOCUMENTS))
|
||||||
/***** Split document string into words *****/
|
/***** Split document string into words *****/
|
||||||
if (Sch_BuildSearchQuery (SearchQuery,"SUBSTRING_INDEX(files.Path,'/',-1)",
|
if (Sch_BuildSearchQuery (SearchQuery,"SUBSTRING_INDEX(brw_files.Path,'/',-1)",
|
||||||
"_latin1 "," COLLATE latin1_general_ci"))
|
"_latin1 "," COLLATE latin1_general_ci"))
|
||||||
{
|
{
|
||||||
/***** Build the query *****/
|
/***** Build the query *****/
|
||||||
|
@ -1003,8 +1009,8 @@ static unsigned Sch_SearchMyDocumentsInDB (const char *RangeQuery)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get files",
|
DB_QuerySELECT (&mysql_res,"can not get files",
|
||||||
"SELECT * FROM "
|
"SELECT * FROM "
|
||||||
"("
|
"("
|
||||||
"SELECT files.FilCod," // Institution
|
"SELECT brw_files.FilCod," // Institution
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"-1 AS CtrCod,"
|
"-1 AS CtrCod,"
|
||||||
|
@ -1014,20 +1020,21 @@ static unsigned Sch_SearchMyDocumentsInDB (const char *RangeQuery)
|
||||||
"-1 AS CrsCod,"
|
"-1 AS CrsCod,"
|
||||||
"'' AS CrsShortName,"
|
"'' AS CrsShortName,"
|
||||||
"-1 AS GrpCod"
|
"-1 AS GrpCod"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.PublisherUsrCod=%ld AND %s"
|
" WHERE brw_files.PublisherUsrCod=%ld"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND %s"
|
||||||
" AND files.Cod=ins_instits.InsCod"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND brw_files.Cod=ins_instits.InsCod"
|
||||||
"%s"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
|
"%s"
|
||||||
" UNION "
|
" UNION "
|
||||||
"SELECT files.FilCod," // Center
|
"SELECT brw_files.FilCod," // Center
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"ctr_centers.CtrCod,"
|
"ctr_centers.CtrCod,"
|
||||||
|
@ -1037,21 +1044,21 @@ static unsigned Sch_SearchMyDocumentsInDB (const char *RangeQuery)
|
||||||
"-1 AS CrsCod,"
|
"-1 AS CrsCod,"
|
||||||
"'' AS CrsShortName,"
|
"'' AS CrsShortName,"
|
||||||
"-1 AS GrpCod"
|
"-1 AS GrpCod"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.PublisherUsrCod=%ld AND %s"
|
" WHERE brw_files.PublisherUsrCod=%ld AND %s"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND files.Cod=ctr_centers.CtrCod"
|
" AND brw_files.Cod=ctr_centers.CtrCod"
|
||||||
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
"%s"
|
"%s"
|
||||||
" UNION "
|
" UNION "
|
||||||
"SELECT files.FilCod," // Degree
|
"SELECT brw_files.FilCod," // Degree
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"ctr_centers.CtrCod,"
|
"ctr_centers.CtrCod,"
|
||||||
|
@ -1061,22 +1068,23 @@ static unsigned Sch_SearchMyDocumentsInDB (const char *RangeQuery)
|
||||||
"-1 AS CrsCod,"
|
"-1 AS CrsCod,"
|
||||||
"'' AS CrsShortName,"
|
"'' AS CrsShortName,"
|
||||||
"-1 AS GrpCod"
|
"-1 AS GrpCod"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.PublisherUsrCod=%ld AND %s"
|
" WHERE brw_files.PublisherUsrCod=%ld"
|
||||||
" AND files.FileBrowser IN (%u,%u)"
|
" AND %s"
|
||||||
" AND files.Cod=deg_degrees.DegCod"
|
" AND brw_files.FileBrowser IN (%u,%u)"
|
||||||
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
" AND brw_files.Cod=deg_degrees.DegCod"
|
||||||
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
||||||
"%s"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
|
"%s"
|
||||||
" UNION "
|
" UNION "
|
||||||
"SELECT files.FilCod," // Course
|
"SELECT brw_files.FilCod," // Course
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"ctr_centers.CtrCod,"
|
"ctr_centers.CtrCod,"
|
||||||
|
@ -1086,23 +1094,24 @@ static unsigned Sch_SearchMyDocumentsInDB (const char *RangeQuery)
|
||||||
"crs_courses.CrsCod,"
|
"crs_courses.CrsCod,"
|
||||||
"crs_courses.ShortName AS CrsShortName,"
|
"crs_courses.ShortName AS CrsShortName,"
|
||||||
"-1 AS GrpCod"
|
"-1 AS GrpCod"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.PublisherUsrCod=%ld AND %s"
|
" WHERE brw_files.PublisherUsrCod=%ld"
|
||||||
" AND files.FileBrowser IN (%u,%u,%u,%u)"
|
" AND %s"
|
||||||
" AND files.Cod=crs_courses.CrsCod"
|
" AND brw_files.FileBrowser IN (%u,%u,%u,%u)"
|
||||||
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
" AND brw_files.Cod=crs_courses.CrsCod"
|
||||||
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
||||||
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
||||||
"%s"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
|
"%s"
|
||||||
" UNION "
|
" UNION "
|
||||||
"SELECT files.FilCod," // Group
|
"SELECT brw_files.FilCod," // Group
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"ins_instits.InsCod,"
|
"ins_instits.InsCod,"
|
||||||
"ins_instits.ShortName AS InsShortName,"
|
"ins_instits.ShortName AS InsShortName,"
|
||||||
"ctr_centers.CtrCod,"
|
"ctr_centers.CtrCod,"
|
||||||
|
@ -1112,27 +1121,28 @@ static unsigned Sch_SearchMyDocumentsInDB (const char *RangeQuery)
|
||||||
"crs_courses.CrsCod,"
|
"crs_courses.CrsCod,"
|
||||||
"crs_courses.ShortName AS CrsShortName,"
|
"crs_courses.ShortName AS CrsShortName,"
|
||||||
"crs_grp.GrpCod"
|
"crs_grp.GrpCod"
|
||||||
" FROM files,"
|
" FROM brw_files,"
|
||||||
"crs_grp,"
|
"crs_grp,"
|
||||||
"crs_grp_types,"
|
"crs_grp_types,"
|
||||||
"crs_courses,"
|
"crs_courses,"
|
||||||
"deg_degrees,"
|
"deg_degrees,"
|
||||||
"ctr_centers,"
|
"ctr_centers,"
|
||||||
"ins_instits,"
|
"ins_instits,"
|
||||||
"cty_countrs"
|
"cty_countrs"
|
||||||
" WHERE files.PublisherUsrCod=%ld AND %s"
|
" WHERE brw_files.PublisherUsrCod=%ld"
|
||||||
" AND files.FileBrowser IN (%u,%u,%u,%u)"
|
" AND %s"
|
||||||
" AND files.Cod=crs_grp.GrpCod"
|
" AND brw_files.FileBrowser IN (%u,%u,%u,%u)"
|
||||||
" AND crs_grp.GrpTypCod=crs_grp_types.GrpTypCod"
|
" AND brw_files.Cod=crs_grp.GrpCod"
|
||||||
" AND crs_grp_types.CrsCod=crs_courses.CrsCod"
|
" AND crs_grp.GrpTypCod=crs_grp_types.GrpTypCod"
|
||||||
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
" AND crs_grp_types.CrsCod=crs_courses.CrsCod"
|
||||||
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
" AND crs_courses.DegCod=deg_degrees.DegCod"
|
||||||
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
" AND deg_degrees.CtrCod=ctr_centers.CtrCod"
|
||||||
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
" AND ctr_centers.InsCod=ins_instits.InsCod"
|
||||||
"%s"
|
" AND ins_instits.CtyCod=cty_countrs.CtyCod"
|
||||||
|
"%s"
|
||||||
" UNION "
|
" UNION "
|
||||||
"SELECT files.FilCod," // Briefcase
|
"SELECT brw_files.FilCod," // Briefcase
|
||||||
"SUBSTRING(files.Path,LOCATE('/',files.Path)) AS PathFromRoot,"
|
"SUBSTRING(brw_files.Path,LOCATE('/',brw_files.Path)) AS PathFromRoot,"
|
||||||
"-1 AS InsCod,"
|
"-1 AS InsCod,"
|
||||||
"'' AS InsShortName,"
|
"'' AS InsShortName,"
|
||||||
"-1 AS CtrCod,"
|
"-1 AS CtrCod,"
|
||||||
|
@ -1142,9 +1152,10 @@ static unsigned Sch_SearchMyDocumentsInDB (const char *RangeQuery)
|
||||||
"-1 AS CrsCod,"
|
"-1 AS CrsCod,"
|
||||||
"'' AS CrsShortName,"
|
"'' AS CrsShortName,"
|
||||||
"-1 AS GrpCod"
|
"-1 AS GrpCod"
|
||||||
" FROM files"
|
" FROM brw_files"
|
||||||
" WHERE files.PublisherUsrCod=%ld AND %s"
|
" WHERE brw_files.PublisherUsrCod=%ld"
|
||||||
" AND files.FileBrowser=%u"
|
" AND %s"
|
||||||
|
" AND brw_files.FileBrowser=%u"
|
||||||
") AS selected_files"
|
") AS selected_files"
|
||||||
" WHERE PathFromRoot<>''"
|
" WHERE PathFromRoot<>''"
|
||||||
" ORDER BY InsShortName,"
|
" ORDER BY InsShortName,"
|
||||||
|
|
|
@ -200,11 +200,16 @@ void Tml_DB_MarkNotesChildrenOfFolderAsUnavailable (Tml_Not_NoteType_t NoteType,
|
||||||
{
|
{
|
||||||
/***** Mark notes as unavailable *****/
|
/***** Mark notes as unavailable *****/
|
||||||
DB_QueryUPDATE ("can not mark notes as unavailable",
|
DB_QueryUPDATE ("can not mark notes as unavailable",
|
||||||
"UPDATE tml_notes SET Unavailable='Y'"
|
"UPDATE tml_notes"
|
||||||
" WHERE NoteType=%u AND Cod IN"
|
" SET Unavailable='Y'"
|
||||||
" (SELECT FilCod FROM files"
|
" WHERE NoteType=%u"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld"
|
" AND Cod IN"
|
||||||
" AND Path LIKE '%s/%%' AND Public='Y')", // Only public files
|
" (SELECT FilCod"
|
||||||
|
" FROM brw_files"
|
||||||
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND Path LIKE '%s/%%'"
|
||||||
|
" AND Public='Y')", // Only public files
|
||||||
(unsigned) NoteType,
|
(unsigned) NoteType,
|
||||||
(unsigned) FileBrowser,Cod,
|
(unsigned) FileBrowser,Cod,
|
||||||
Path);
|
Path);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user