mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-14 12:44:09 +02:00
Version 21.3.1: Sep 15, 2021 Queries moved to module swad_browser_database.
This commit is contained in:
parent
732e527430
commit
9d25990134
124
swad_browser.c
124
swad_browser.c
|
@ -97,40 +97,6 @@ struct Brw_NumObjects
|
||||||
/***************************** Public constants ******************************/
|
/***************************** Public constants ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
// Browsers types for database "files" and "brw_sizes" tables
|
|
||||||
const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER] =
|
|
||||||
{
|
|
||||||
[Brw_UNKNOWN ] = Brw_UNKNOWN,
|
|
||||||
[Brw_SHOW_DOC_CRS] = Brw_ADMI_DOC_CRS,
|
|
||||||
[Brw_SHOW_MRK_CRS] = Brw_ADMI_MRK_CRS,
|
|
||||||
[Brw_ADMI_DOC_CRS] = Brw_ADMI_DOC_CRS,
|
|
||||||
[Brw_ADMI_SHR_CRS] = Brw_ADMI_SHR_CRS,
|
|
||||||
[Brw_ADMI_SHR_GRP] = Brw_ADMI_SHR_GRP,
|
|
||||||
[Brw_ADMI_WRK_USR] = Brw_ADMI_WRK_USR,
|
|
||||||
[Brw_ADMI_WRK_CRS] = Brw_ADMI_WRK_USR,
|
|
||||||
[Brw_ADMI_MRK_CRS] = Brw_ADMI_MRK_CRS,
|
|
||||||
[Brw_ADMI_BRF_USR] = Brw_ADMI_BRF_USR,
|
|
||||||
[Brw_SHOW_DOC_GRP] = Brw_ADMI_DOC_GRP,
|
|
||||||
[Brw_ADMI_DOC_GRP] = Brw_ADMI_DOC_GRP,
|
|
||||||
[Brw_SHOW_MRK_GRP] = Brw_ADMI_MRK_GRP,
|
|
||||||
[Brw_ADMI_MRK_GRP] = Brw_ADMI_MRK_GRP,
|
|
||||||
[Brw_ADMI_ASG_USR] = Brw_ADMI_ASG_USR,
|
|
||||||
[Brw_ADMI_ASG_CRS] = Brw_ADMI_ASG_USR,
|
|
||||||
[Brw_SHOW_DOC_DEG] = Brw_ADMI_DOC_DEG,
|
|
||||||
[Brw_ADMI_DOC_DEG] = Brw_ADMI_DOC_DEG,
|
|
||||||
[Brw_SHOW_DOC_CTR] = Brw_ADMI_DOC_CTR,
|
|
||||||
[Brw_ADMI_DOC_CTR] = Brw_ADMI_DOC_CTR,
|
|
||||||
[Brw_SHOW_DOC_INS] = Brw_ADMI_DOC_INS,
|
|
||||||
[Brw_ADMI_DOC_INS] = Brw_ADMI_DOC_INS,
|
|
||||||
[Brw_ADMI_SHR_DEG] = Brw_ADMI_SHR_DEG,
|
|
||||||
[Brw_ADMI_SHR_CTR] = Brw_ADMI_SHR_CTR,
|
|
||||||
[Brw_ADMI_SHR_INS] = Brw_ADMI_SHR_INS,
|
|
||||||
[Brw_ADMI_TCH_CRS] = Brw_ADMI_TCH_CRS,
|
|
||||||
[Brw_ADMI_TCH_GRP] = Brw_ADMI_TCH_GRP,
|
|
||||||
[Brw_ADMI_DOC_PRJ] = Brw_ADMI_DOC_PRJ,
|
|
||||||
[Brw_ADMI_ASS_PRJ] = Brw_ADMI_ASS_PRJ,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Names of root folders
|
// Names of root folders
|
||||||
const char *Brw_RootFolderInternalNames[Brw_NUM_TYPES_FILE_BROWSER] =
|
const char *Brw_RootFolderInternalNames[Brw_NUM_TYPES_FILE_BROWSER] =
|
||||||
{
|
{
|
||||||
|
@ -1334,10 +1300,6 @@ static unsigned Brw_GetFileViewsFromMe (long FilCod);
|
||||||
|
|
||||||
static void Brw_RemoveOneFileOrFolderFromDB (const char Path[PATH_MAX + 1]);
|
static void Brw_RemoveOneFileOrFolderFromDB (const char Path[PATH_MAX + 1]);
|
||||||
static void Brw_RemoveChildrenOfFolderFromDB (const char Path[PATH_MAX + 1]);
|
static void Brw_RemoveChildrenOfFolderFromDB (const char Path[PATH_MAX + 1]);
|
||||||
static void Brw_RenameOneFolderInDB (const char OldPath[PATH_MAX + 1],
|
|
||||||
const char NewPath[PATH_MAX + 1]);
|
|
||||||
static void Brw_RenameChildrenFilesOrFoldersInDB (const char OldPath[PATH_MAX + 1],
|
|
||||||
const char NewPath[PATH_MAX + 1]);
|
|
||||||
|
|
||||||
static void Brw_SetIfICanEditFileOrFolder (bool Value);
|
static void Brw_SetIfICanEditFileOrFolder (bool Value);
|
||||||
static bool Brw_GetIfICanEditFileOrFolder (void);
|
static bool Brw_GetIfICanEditFileOrFolder (void);
|
||||||
|
@ -1350,7 +1312,6 @@ static bool Brw_CheckIfICanViewProjectDocuments (long PrjCod);
|
||||||
static bool Brw_CheckIfICanViewProjectAssessment (long PrjCod);
|
static bool Brw_CheckIfICanViewProjectAssessment (long PrjCod);
|
||||||
static bool Brw_CheckIfICanModifyPrjDocFileOrFolder (void);
|
static bool Brw_CheckIfICanModifyPrjDocFileOrFolder (void);
|
||||||
static bool Brw_CheckIfICanModifyPrjAssFileOrFolder (void);
|
static bool Brw_CheckIfICanModifyPrjAssFileOrFolder (void);
|
||||||
static long Brw_GetPublisherOfSubtree (void);
|
|
||||||
|
|
||||||
static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row);
|
static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row);
|
||||||
|
|
||||||
|
@ -7262,9 +7223,9 @@ void Brw_RenFolderFileBrowser (void)
|
||||||
/* If a folder is renamed,
|
/* If a folder is renamed,
|
||||||
it is necessary to rename all the entries in the tables of files
|
it is necessary to rename all the entries in the tables of files
|
||||||
that belong to the subtree starting at that folder */
|
that belong to the subtree starting at that folder */
|
||||||
Brw_RenameOneFolderInDB (OldPathInTree,
|
Brw_DB_RenameOneFolder (OldPathInTree,
|
||||||
NewPathInTree);
|
NewPathInTree);
|
||||||
Brw_RenameChildrenFilesOrFoldersInDB (OldPathInTree,
|
Brw_DB_RenameChildrenFilesOrFolders (OldPathInTree,
|
||||||
NewPathInTree);
|
NewPathInTree);
|
||||||
|
|
||||||
/* Remove affected clipboards */
|
/* Remove affected clipboards */
|
||||||
|
@ -9314,55 +9275,6 @@ static void Brw_RemoveChildrenOfFolderFromDB (const char Path[PATH_MAX + 1])
|
||||||
Brw_DB_RemoveChildrenOfFolder (Path);
|
Brw_DB_RemoveChildrenOfFolder (Path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/*************** Rename a file or folder in table of files *******************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void Brw_RenameOneFolderInDB (const char OldPath[PATH_MAX + 1],
|
|
||||||
const char NewPath[PATH_MAX + 1])
|
|
||||||
{
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
|
||||||
|
|
||||||
/***** Update file or folder in table of common files *****/
|
|
||||||
DB_QueryUPDATE ("can not update folder name in a common zone",
|
|
||||||
"UPDATE brw_files"
|
|
||||||
" SET Path='%s'"
|
|
||||||
" WHERE FileBrowser=%u"
|
|
||||||
" AND Cod=%ld"
|
|
||||||
" AND ZoneUsrCod=%ld"
|
|
||||||
" AND Path='%s'",
|
|
||||||
NewPath,
|
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
|
||||||
Cod,ZoneUsrCod,
|
|
||||||
OldPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/************** Rename children of a folder in table of files ****************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void Brw_RenameChildrenFilesOrFoldersInDB (const char OldPath[PATH_MAX + 1],
|
|
||||||
const char NewPath[PATH_MAX + 1])
|
|
||||||
{
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
|
||||||
unsigned StartFinalSubpathNotChanged = strlen (OldPath) + 2;
|
|
||||||
|
|
||||||
/***** Update children of a folder in table of files *****/
|
|
||||||
DB_QueryUPDATE ("can not rename file or folder names in a common zone",
|
|
||||||
"UPDATE brw_files"
|
|
||||||
" SET Path=CONCAT('%s','/',SUBSTRING(Path,%u))"
|
|
||||||
" WHERE FileBrowser=%u"
|
|
||||||
" AND Cod=%ld"
|
|
||||||
" AND ZoneUsrCod=%ld"
|
|
||||||
" AND Path LIKE '%s/%%'",
|
|
||||||
NewPath,StartFinalSubpathNotChanged,
|
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
|
||||||
Cod,ZoneUsrCod,
|
|
||||||
OldPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********** Check if I have permission to modify a file or folder ************/
|
/********** Check if I have permission to modify a file or folder ************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -9535,7 +9447,7 @@ static bool Brw_CheckIfICanModifySharedFileOrFolder (void)
|
||||||
{
|
{
|
||||||
case Rol_STD: // If I am a student or a non-editing teacher...
|
case Rol_STD: // If I am a student or a non-editing teacher...
|
||||||
case Rol_NET: // ...I can modify the file/folder if I am the publisher
|
case Rol_NET: // ...I can modify the file/folder if I am the publisher
|
||||||
return (Gbl.Usrs.Me.UsrDat.UsrCod == Brw_GetPublisherOfSubtree ()); // Am I the publisher of subtree?
|
return (Gbl.Usrs.Me.UsrDat.UsrCod == Brw_DB_GetPublisherOfSubtree (Gbl.FileBrowser.FilFolLnk.Full)); // Am I the publisher of subtree?
|
||||||
case Rol_TCH:
|
case Rol_TCH:
|
||||||
case Rol_DEG_ADM:
|
case Rol_DEG_ADM:
|
||||||
case Rol_CTR_ADM:
|
case Rol_CTR_ADM:
|
||||||
|
@ -9554,7 +9466,7 @@ static bool Brw_CheckIfICanModifyPrivateFileOrFolder (void)
|
||||||
{
|
{
|
||||||
case Rol_NET: // If I am a student or a non-editing teacher...
|
case Rol_NET: // If I am a student or a non-editing teacher...
|
||||||
// ...I can modify the file/folder if I am the publisher
|
// ...I can modify the file/folder if I am the publisher
|
||||||
return (Gbl.Usrs.Me.UsrDat.UsrCod == Brw_GetPublisherOfSubtree ()); // Am I the publisher of subtree?
|
return (Gbl.Usrs.Me.UsrDat.UsrCod == Brw_DB_GetPublisherOfSubtree (Gbl.FileBrowser.FilFolLnk.Full)); // Am I the publisher of subtree?
|
||||||
case Rol_TCH:
|
case Rol_TCH:
|
||||||
case Rol_DEG_ADM:
|
case Rol_DEG_ADM:
|
||||||
case Rol_CTR_ADM:
|
case Rol_CTR_ADM:
|
||||||
|
@ -9654,7 +9566,7 @@ static bool Brw_CheckIfICanModifyPrjDocFileOrFolder (void)
|
||||||
case Rol_NET:
|
case Rol_NET:
|
||||||
MyRolesInProject = Prj_GetMyRolesInProject (Prj_GetPrjCod ());
|
MyRolesInProject = Prj_GetMyRolesInProject (Prj_GetPrjCod ());
|
||||||
if (MyRolesInProject) // I am a member
|
if (MyRolesInProject) // I am a member
|
||||||
return (Gbl.Usrs.Me.UsrDat.UsrCod == Brw_GetPublisherOfSubtree ()); // Am I the publisher of subtree?
|
return (Gbl.Usrs.Me.UsrDat.UsrCod == Brw_DB_GetPublisherOfSubtree (Gbl.FileBrowser.FilFolLnk.Full)); // Am I the publisher of subtree?
|
||||||
return false;
|
return false;
|
||||||
case Rol_TCH: // Editing teachers in a course can access to all files
|
case Rol_TCH: // Editing teachers in a course can access to all files
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
|
@ -9684,7 +9596,7 @@ static bool Brw_CheckIfICanModifyPrjAssFileOrFolder (void)
|
||||||
MyRolesInProject = Prj_GetMyRolesInProject (Prj_GetPrjCod ());
|
MyRolesInProject = Prj_GetMyRolesInProject (Prj_GetPrjCod ());
|
||||||
if ((MyRolesInProject & (1 << Prj_ROLE_TUT | // Tutor...
|
if ((MyRolesInProject & (1 << Prj_ROLE_TUT | // Tutor...
|
||||||
1 << Prj_ROLE_EVL))) // ...or evaluator
|
1 << Prj_ROLE_EVL))) // ...or evaluator
|
||||||
return (Gbl.Usrs.Me.UsrDat.UsrCod == Brw_GetPublisherOfSubtree ()); // Am I the publisher of subtree?
|
return (Gbl.Usrs.Me.UsrDat.UsrCod == Brw_DB_GetPublisherOfSubtree (Gbl.FileBrowser.FilFolLnk.Full)); // Am I the publisher of subtree?
|
||||||
return false;
|
return false;
|
||||||
case Rol_TCH: // Editing teachers in a course can access to all files
|
case Rol_TCH: // Editing teachers in a course can access to all files
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
|
@ -9695,30 +9607,6 @@ static bool Brw_CheckIfICanModifyPrjAssFileOrFolder (void)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/************************ Get the publisher of a subtree *********************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static long Brw_GetPublisherOfSubtree (void)
|
|
||||||
{
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
|
||||||
|
|
||||||
/***** Get all common files that are equal to full path (including filename)
|
|
||||||
or that are under that full path from database *****/
|
|
||||||
return DB_QuerySELECTCode ("can not get publishers of files",
|
|
||||||
"SELECT DISTINCT(PublisherUsrCod)"
|
|
||||||
" FROM brw_files"
|
|
||||||
" WHERE FileBrowser=%u"
|
|
||||||
" AND Cod=%ld"
|
|
||||||
" AND (Path='%s'"
|
|
||||||
" OR"
|
|
||||||
" Path LIKE '%s/%%')",
|
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
|
||||||
Cod,
|
|
||||||
Gbl.FileBrowser.FilFolLnk.Full,
|
|
||||||
Gbl.FileBrowser.FilFolLnk.Full);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************* Remove common zones of all the groups of a type ***************/
|
/************* Remove common zones of all the groups of a type ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -87,10 +87,44 @@ extern struct Globals Gbl;
|
||||||
/***************************** Private constants *****************************/
|
/***************************** Private constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
// Browsers types for database "files" and "brw_sizes" tables
|
||||||
|
const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER] =
|
||||||
|
{
|
||||||
|
[Brw_UNKNOWN ] = Brw_UNKNOWN,
|
||||||
|
[Brw_SHOW_DOC_CRS] = Brw_ADMI_DOC_CRS,
|
||||||
|
[Brw_SHOW_MRK_CRS] = Brw_ADMI_MRK_CRS,
|
||||||
|
[Brw_ADMI_DOC_CRS] = Brw_ADMI_DOC_CRS,
|
||||||
|
[Brw_ADMI_SHR_CRS] = Brw_ADMI_SHR_CRS,
|
||||||
|
[Brw_ADMI_SHR_GRP] = Brw_ADMI_SHR_GRP,
|
||||||
|
[Brw_ADMI_WRK_USR] = Brw_ADMI_WRK_USR,
|
||||||
|
[Brw_ADMI_WRK_CRS] = Brw_ADMI_WRK_USR,
|
||||||
|
[Brw_ADMI_MRK_CRS] = Brw_ADMI_MRK_CRS,
|
||||||
|
[Brw_ADMI_BRF_USR] = Brw_ADMI_BRF_USR,
|
||||||
|
[Brw_SHOW_DOC_GRP] = Brw_ADMI_DOC_GRP,
|
||||||
|
[Brw_ADMI_DOC_GRP] = Brw_ADMI_DOC_GRP,
|
||||||
|
[Brw_SHOW_MRK_GRP] = Brw_ADMI_MRK_GRP,
|
||||||
|
[Brw_ADMI_MRK_GRP] = Brw_ADMI_MRK_GRP,
|
||||||
|
[Brw_ADMI_ASG_USR] = Brw_ADMI_ASG_USR,
|
||||||
|
[Brw_ADMI_ASG_CRS] = Brw_ADMI_ASG_USR,
|
||||||
|
[Brw_SHOW_DOC_DEG] = Brw_ADMI_DOC_DEG,
|
||||||
|
[Brw_ADMI_DOC_DEG] = Brw_ADMI_DOC_DEG,
|
||||||
|
[Brw_SHOW_DOC_CTR] = Brw_ADMI_DOC_CTR,
|
||||||
|
[Brw_ADMI_DOC_CTR] = Brw_ADMI_DOC_CTR,
|
||||||
|
[Brw_SHOW_DOC_INS] = Brw_ADMI_DOC_INS,
|
||||||
|
[Brw_ADMI_DOC_INS] = Brw_ADMI_DOC_INS,
|
||||||
|
[Brw_ADMI_SHR_DEG] = Brw_ADMI_SHR_DEG,
|
||||||
|
[Brw_ADMI_SHR_CTR] = Brw_ADMI_SHR_CTR,
|
||||||
|
[Brw_ADMI_SHR_INS] = Brw_ADMI_SHR_INS,
|
||||||
|
[Brw_ADMI_TCH_CRS] = Brw_ADMI_TCH_CRS,
|
||||||
|
[Brw_ADMI_TCH_GRP] = Brw_ADMI_TCH_GRP,
|
||||||
|
[Brw_ADMI_DOC_PRJ] = Brw_ADMI_DOC_PRJ,
|
||||||
|
[Brw_ADMI_ASS_PRJ] = Brw_ADMI_ASS_PRJ,
|
||||||
|
};
|
||||||
|
|
||||||
// Browsers types for database "brw_last" table
|
// Browsers types for database "brw_last" table
|
||||||
// Assignments and works are stored as one in brw_last...
|
// Assignments and works are stored as one in brw_last...
|
||||||
// ...because a user views them at the same time
|
// ...because a user views them at the same time
|
||||||
static const Brw_FileBrowser_t Brw_FileBrowserForDB_file_browser_last[Brw_NUM_TYPES_FILE_BROWSER] =
|
static const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_file_browser_last[Brw_NUM_TYPES_FILE_BROWSER] =
|
||||||
{
|
{
|
||||||
[Brw_UNKNOWN ] = Brw_UNKNOWN,
|
[Brw_UNKNOWN ] = Brw_UNKNOWN,
|
||||||
[Brw_SHOW_DOC_CRS] = Brw_ADMI_DOC_CRS,
|
[Brw_SHOW_DOC_CRS] = Brw_ADMI_DOC_CRS,
|
||||||
|
@ -124,7 +158,7 @@ static const Brw_FileBrowser_t Brw_FileBrowserForDB_file_browser_last[Brw_NUM_TY
|
||||||
};
|
};
|
||||||
|
|
||||||
// Browsers types for database "expanded_folders" table
|
// Browsers types for database "expanded_folders" table
|
||||||
static const Brw_FileBrowser_t Brw_FileBrowserForDB_expanded_folders[Brw_NUM_TYPES_FILE_BROWSER] =
|
static const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_expanded_folders[Brw_NUM_TYPES_FILE_BROWSER] =
|
||||||
{
|
{
|
||||||
[Brw_UNKNOWN ] = Brw_UNKNOWN,
|
[Brw_UNKNOWN ] = Brw_UNKNOWN,
|
||||||
[Brw_SHOW_DOC_CRS] = Brw_ADMI_DOC_CRS,
|
[Brw_SHOW_DOC_CRS] = Brw_ADMI_DOC_CRS,
|
||||||
|
@ -172,7 +206,6 @@ static const Brw_FileBrowser_t Brw_FileBrowserForDB_expanded_folders[Brw_NUM_TYP
|
||||||
long Brw_DB_AddPath (long PublisherUsrCod,Brw_FileType_t FileType,
|
long Brw_DB_AddPath (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||||
const char *FullPathInTree,bool IsPublic,Brw_License_t License)
|
const char *FullPathInTree,bool IsPublic,Brw_License_t License)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
|
|
||||||
|
@ -185,8 +218,9 @@ long Brw_DB_AddPath (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" (%u,%ld,%ld,%ld,"
|
" (%u,%ld,%ld,%ld,"
|
||||||
"%u,'%s','N','%c',%u)",
|
"%u,'%s','N','%c',%u)",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,ZoneUsrCod,
|
Cod,
|
||||||
|
ZoneUsrCod,
|
||||||
PublisherUsrCod,
|
PublisherUsrCod,
|
||||||
(unsigned) FileType,
|
(unsigned) FileType,
|
||||||
FullPathInTree,
|
FullPathInTree,
|
||||||
|
@ -195,6 +229,53 @@ long Brw_DB_AddPath (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||||
(unsigned) License);
|
(unsigned) License);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*************** Rename a file or folder in table of files *******************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Brw_DB_RenameOneFolder (const char OldPath[PATH_MAX + 1],
|
||||||
|
const char NewPath[PATH_MAX + 1])
|
||||||
|
{
|
||||||
|
/***** Update file or folder in table of common files *****/
|
||||||
|
DB_QueryUPDATE ("can not update folder name in a common zone",
|
||||||
|
"UPDATE brw_files"
|
||||||
|
" SET Path='%s'"
|
||||||
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path='%s'",
|
||||||
|
NewPath,
|
||||||
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
|
Brw_GetCodForFileBrowser (),
|
||||||
|
Brw_GetZoneUsrCodForFileBrowser (),
|
||||||
|
OldPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************** Rename children of a folder in table of files ****************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Brw_DB_RenameChildrenFilesOrFolders (const char OldPath[PATH_MAX + 1],
|
||||||
|
const char NewPath[PATH_MAX + 1])
|
||||||
|
{
|
||||||
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
|
unsigned StartFinalSubpathNotChanged = strlen (OldPath) + 2;
|
||||||
|
|
||||||
|
/***** Update children of a folder in table of files *****/
|
||||||
|
DB_QueryUPDATE ("can not rename file or folder names in a common zone",
|
||||||
|
"UPDATE brw_files"
|
||||||
|
" SET Path=CONCAT('%s','/',SUBSTRING(Path,%u))"
|
||||||
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND ZoneUsrCod=%ld"
|
||||||
|
" AND Path LIKE '%s/%%'",
|
||||||
|
NewPath,StartFinalSubpathNotChanged,
|
||||||
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
|
Brw_GetCodForFileBrowser (),
|
||||||
|
Brw_GetZoneUsrCodForFileBrowser (),
|
||||||
|
OldPath);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*********************** Get file code using its path ************************/
|
/*********************** Get file code using its path ************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -203,7 +284,6 @@ long Brw_DB_AddPath (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||||
|
|
||||||
long Brw_DB_GetFilCodByPath (const char *Path,bool OnlyIfPublic)
|
long Brw_DB_GetFilCodByPath (const char *Path,bool OnlyIfPublic)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
|
|
||||||
|
@ -215,7 +295,7 @@ long Brw_DB_GetFilCodByPath (const char *Path,bool OnlyIfPublic)
|
||||||
" AND ZoneUsrCod=%ld"
|
" AND ZoneUsrCod=%ld"
|
||||||
" AND Path='%s'"
|
" AND Path='%s'"
|
||||||
"%s",
|
"%s",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
ZoneUsrCod,
|
ZoneUsrCod,
|
||||||
Path,
|
Path,
|
||||||
|
@ -231,7 +311,6 @@ long Brw_DB_GetFilCodByPath (const char *Path,bool OnlyIfPublic)
|
||||||
|
|
||||||
unsigned Brw_DB_GetFileMetadataByPath (MYSQL_RES **mysql_res,const char *Path)
|
unsigned Brw_DB_GetFileMetadataByPath (MYSQL_RES **mysql_res,const char *Path)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
|
|
||||||
|
@ -252,7 +331,7 @@ unsigned Brw_DB_GetFileMetadataByPath (MYSQL_RES **mysql_res,const char *Path)
|
||||||
" AND Cod=%ld"
|
" AND Cod=%ld"
|
||||||
" AND ZoneUsrCod=%ld"
|
" AND ZoneUsrCod=%ld"
|
||||||
" AND Path='%s'",
|
" AND Path='%s'",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
ZoneUsrCod,
|
ZoneUsrCod,
|
||||||
Path);
|
Path);
|
||||||
|
@ -284,6 +363,28 @@ unsigned Brw_DB_GetFileMetadataByCod (MYSQL_RES **mysql_res,long FilCod)
|
||||||
FilCod);
|
FilCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************************ Get the publisher of a subtree *********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
long Brw_DB_GetPublisherOfSubtree (const char *Path)
|
||||||
|
{
|
||||||
|
/***** Get all common files that are equal to full path (including filename)
|
||||||
|
or that are under that full path from database *****/
|
||||||
|
return DB_QuerySELECTCode ("can not get publishers of files",
|
||||||
|
"SELECT DISTINCT(PublisherUsrCod)"
|
||||||
|
" FROM brw_files"
|
||||||
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld"
|
||||||
|
" AND (Path='%s'"
|
||||||
|
" OR"
|
||||||
|
" Path LIKE '%s/%%')",
|
||||||
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
|
Brw_GetCodForFileBrowser (),
|
||||||
|
Path,
|
||||||
|
Path);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************ Get current number of files published by a user ****************/
|
/************ Get current number of files published by a user ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -307,10 +408,9 @@ unsigned Brw_DB_GetNumFilesUsr (long UsrCod)
|
||||||
|
|
||||||
void Brw_DB_RemoveOneFileOrFolder (const char Path[PATH_MAX + 1])
|
void Brw_DB_RemoveOneFileOrFolder (const char Path[PATH_MAX + 1])
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowser = Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||||
|
|
||||||
/***** Remove from database the entries that store the marks properties *****/
|
/***** Remove from database the entries that store the marks properties *****/
|
||||||
if (FileBrowser == Brw_ADMI_MRK_CRS ||
|
if (FileBrowser == Brw_ADMI_MRK_CRS ||
|
||||||
|
@ -361,10 +461,9 @@ void Brw_DB_RemoveOneFileOrFolder (const char Path[PATH_MAX + 1])
|
||||||
|
|
||||||
void Brw_DB_RemoveChildrenOfFolder (const char Path[PATH_MAX + 1])
|
void Brw_DB_RemoveChildrenOfFolder (const char Path[PATH_MAX + 1])
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowser = Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||||
|
|
||||||
/***** Remove from database the entries that store the marks properties *****/
|
/***** Remove from database the entries that store the marks properties *****/
|
||||||
if (FileBrowser == Brw_ADMI_MRK_CRS ||
|
if (FileBrowser == Brw_ADMI_MRK_CRS ||
|
||||||
|
@ -1233,7 +1332,6 @@ void Brw_DB_RemoveUsrFiles (long UsrCod)
|
||||||
void Brw_DB_ChangeFilePublic (const struct FileMetadata *FileMetadata,
|
void Brw_DB_ChangeFilePublic (const struct FileMetadata *FileMetadata,
|
||||||
bool IsPublic,Brw_License_t License)
|
bool IsPublic,Brw_License_t License)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
|
|
||||||
|
@ -1254,7 +1352,7 @@ void Brw_DB_ChangeFilePublic (const struct FileMetadata *FileMetadata,
|
||||||
IsPublic ? 'Y' :
|
IsPublic ? 'Y' :
|
||||||
'N',
|
'N',
|
||||||
(unsigned) License,
|
(unsigned) License,
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
ZoneUsrCod,
|
ZoneUsrCod,
|
||||||
FileMetadata->FilCod,
|
FileMetadata->FilCod,
|
||||||
|
@ -1267,7 +1365,6 @@ void Brw_DB_ChangeFilePublic (const struct FileMetadata *FileMetadata,
|
||||||
|
|
||||||
bool Brw_DB_GetIfFolderHasPublicFiles (const char Path[PATH_MAX + 1])
|
bool Brw_DB_GetIfFolderHasPublicFiles (const char Path[PATH_MAX + 1])
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
|
|
||||||
|
@ -1280,7 +1377,7 @@ bool Brw_DB_GetIfFolderHasPublicFiles (const char Path[PATH_MAX + 1])
|
||||||
" AND ZoneUsrCod=%ld"
|
" AND ZoneUsrCod=%ld"
|
||||||
" AND Path LIKE '%s/%%'"
|
" AND Path LIKE '%s/%%'"
|
||||||
" AND Public='Y'",
|
" AND Public='Y'",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
ZoneUsrCod,
|
ZoneUsrCod,
|
||||||
Path) != 0);
|
Path) != 0);
|
||||||
|
@ -1464,7 +1561,7 @@ void Brw_DB_UpdateDateMyLastAccFileBrowser (void)
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" (%ld,%u,%ld,NOW())",
|
" (%ld,%u,%ld,NOW())",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
(unsigned) Brw_FileBrowserForDB_file_browser_last[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_file_browser_last[Gbl.FileBrowser.Type],
|
||||||
Cod);
|
Cod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1485,7 +1582,7 @@ unsigned Brw_DB_GetDateMyLastAccFileBrowser (MYSQL_RES **mysql_res)
|
||||||
" AND FileBrowser=%u"
|
" AND FileBrowser=%u"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
(unsigned) Brw_FileBrowserForDB_file_browser_last[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_file_browser_last[Gbl.FileBrowser.Type],
|
||||||
Cod);
|
Cod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1601,7 +1698,6 @@ unsigned Brw_DB_GetNumFileViewsUsr (long UsrCod)
|
||||||
|
|
||||||
void Brw_DB_ChangeFileOrFolderHidden (const char Path[PATH_MAX + 1],bool IsHidden)
|
void Brw_DB_ChangeFileOrFolderHidden (const char Path[PATH_MAX + 1],bool IsHidden)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
|
|
||||||
|
@ -1615,7 +1711,7 @@ void Brw_DB_ChangeFileOrFolderHidden (const char Path[PATH_MAX + 1],bool IsHidde
|
||||||
" AND Path='%s'",
|
" AND Path='%s'",
|
||||||
IsHidden ? 'Y' :
|
IsHidden ? 'Y' :
|
||||||
'N',
|
'N',
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
ZoneUsrCod,
|
ZoneUsrCod,
|
||||||
Path);
|
Path);
|
||||||
|
@ -1628,7 +1724,6 @@ void Brw_DB_ChangeFileOrFolderHidden (const char Path[PATH_MAX + 1],bool IsHidde
|
||||||
unsigned Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingPath (MYSQL_RES **mysql_res,
|
unsigned Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingPath (MYSQL_RES **mysql_res,
|
||||||
const char *Path)
|
const char *Path)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
|
|
||||||
|
@ -1640,7 +1735,7 @@ unsigned Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingPath (MYSQL_RES **mysql_res
|
||||||
" AND Cod=%ld"
|
" AND Cod=%ld"
|
||||||
" AND ZoneUsrCod=%ld"
|
" AND ZoneUsrCod=%ld"
|
||||||
" AND Path='%s'",
|
" AND Path='%s'",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
ZoneUsrCod,
|
ZoneUsrCod,
|
||||||
Path);
|
Path);
|
||||||
|
@ -1692,7 +1787,7 @@ void Brw_DB_InsertFolderInExpandedFolders (const char Path[PATH_MAX + 1])
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" (%ld,%u,%ld,%ld,'%s/',NOW())",
|
" (%ld,%u,%ld,%ld,'%s/',NOW())",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
(unsigned) Brw_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
WorksUsrCod,
|
WorksUsrCod,
|
||||||
Path);
|
Path);
|
||||||
|
@ -1706,7 +1801,7 @@ void Brw_DB_UpdateClickTimeOfThisFileBrowserInExpandedFolders (void)
|
||||||
{
|
{
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long WorksUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long WorksUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_DB_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type];
|
||||||
|
|
||||||
if (Cod > 0)
|
if (Cod > 0)
|
||||||
{
|
{
|
||||||
|
@ -1751,7 +1846,7 @@ bool Brw_DB_GetIfExpandedFolder (const char Path[PATH_MAX + 1])
|
||||||
{
|
{
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long WorksUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long WorksUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_DB_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type];
|
||||||
|
|
||||||
if (Cod > 0)
|
if (Cod > 0)
|
||||||
{
|
{
|
||||||
|
@ -1802,7 +1897,7 @@ void Brw_DB_RemoveFolderFromExpandedFolders (const char Path[PATH_MAX + 1])
|
||||||
{
|
{
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long WorksUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long WorksUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_DB_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type];
|
||||||
|
|
||||||
if (Cod > 0)
|
if (Cod > 0)
|
||||||
{
|
{
|
||||||
|
@ -1847,7 +1942,7 @@ void Brw_DB_RemoveAffectedExpandedFolders (const char Path[PATH_MAX + 1])
|
||||||
{
|
{
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long WorksUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long WorksUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_DB_FileBrowserForDB_expanded_folders[Gbl.FileBrowser.Type];
|
||||||
|
|
||||||
if (Cod > 0)
|
if (Cod > 0)
|
||||||
{
|
{
|
||||||
|
@ -1896,7 +1991,7 @@ void Brw_DB_RenameAffectedExpandedFolders (Brw_FileBrowser_t FileBrowser,
|
||||||
const char *OldPath,const char *NewPath)
|
const char *OldPath,const char *NewPath)
|
||||||
{
|
{
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_FileBrowserForDB_expanded_folders[FileBrowser];
|
Brw_FileBrowser_t FileBrowserForExpandedFolders = Brw_DB_FileBrowserForDB_expanded_folders[FileBrowser];
|
||||||
unsigned StartFinalSubpathNotChanged = strlen (OldPath) + 2;
|
unsigned StartFinalSubpathNotChanged = strlen (OldPath) + 2;
|
||||||
|
|
||||||
if (Cod > 0)
|
if (Cod > 0)
|
||||||
|
@ -2169,7 +2264,6 @@ void Brw_DB_RemoveAffectedClipboards (Brw_FileBrowser_t FileBrowser,
|
||||||
|
|
||||||
void Brw_DB_StoreSizeOfFileZone (void)
|
void Brw_DB_StoreSizeOfFileZone (void)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||||
|
|
||||||
|
@ -2181,7 +2275,7 @@ void Brw_DB_StoreSizeOfFileZone (void)
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" (%u,%ld,%ld,"
|
" (%u,%ld,%ld,"
|
||||||
"%u,'%lu','%lu','%llu')",
|
"%u,'%lu','%lu','%llu')",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,ZoneUsrCod,
|
Cod,ZoneUsrCod,
|
||||||
Gbl.FileBrowser.Size.NumLevls,
|
Gbl.FileBrowser.Size.NumLevls,
|
||||||
Gbl.FileBrowser.Size.NumFolds,
|
Gbl.FileBrowser.Size.NumFolds,
|
||||||
|
|
|
@ -50,9 +50,14 @@
|
||||||
//---------------------------------- Files ------------------------------------
|
//---------------------------------- Files ------------------------------------
|
||||||
long Brw_DB_AddPath (long PublisherUsrCod,Brw_FileType_t FileType,
|
long Brw_DB_AddPath (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||||
const char *FullPathInTree,bool IsPublic,Brw_License_t License);
|
const char *FullPathInTree,bool IsPublic,Brw_License_t License);
|
||||||
|
void Brw_DB_RenameOneFolder (const char OldPath[PATH_MAX + 1],
|
||||||
|
const char NewPath[PATH_MAX + 1]);
|
||||||
|
void Brw_DB_RenameChildrenFilesOrFolders (const char OldPath[PATH_MAX + 1],
|
||||||
|
const char NewPath[PATH_MAX + 1]);
|
||||||
long Brw_DB_GetFilCodByPath (const char *Path,bool OnlyIfPublic);
|
long Brw_DB_GetFilCodByPath (const char *Path,bool OnlyIfPublic);
|
||||||
unsigned Brw_DB_GetFileMetadataByPath (MYSQL_RES **mysql_res,const char *Path);
|
unsigned Brw_DB_GetFileMetadataByPath (MYSQL_RES **mysql_res,const char *Path);
|
||||||
unsigned Brw_DB_GetFileMetadataByCod (MYSQL_RES **mysql_res,long FilCod);
|
unsigned Brw_DB_GetFileMetadataByCod (MYSQL_RES **mysql_res,long FilCod);
|
||||||
|
long Brw_DB_GetPublisherOfSubtree (const char *Path);
|
||||||
unsigned Brw_DB_GetNumFilesUsr (long UsrCod);
|
unsigned Brw_DB_GetNumFilesUsr (long UsrCod);
|
||||||
void Brw_DB_RemoveOneFileOrFolder (const char Path[PATH_MAX + 1]);
|
void Brw_DB_RemoveOneFileOrFolder (const char Path[PATH_MAX + 1]);
|
||||||
void Brw_DB_RemoveChildrenOfFolder (const char Path[PATH_MAX + 1]);
|
void Brw_DB_RemoveChildrenOfFolder (const char Path[PATH_MAX + 1]);
|
||||||
|
|
|
@ -602,13 +602,14 @@ TODO: FIX BUG, URGENT! En las fechas como par
|
||||||
|
|
||||||
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
|
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 21.3 (2021-09-15)"
|
#define Log_PLATFORM_VERSION "SWAD 21.3.1 (2021-09-15)"
|
||||||
#define CSS_FILE "swad20.45.css"
|
#define CSS_FILE "swad20.45.css"
|
||||||
#define JS_FILE "swad20.69.1.js"
|
#define JS_FILE "swad20.69.1.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 21.3.1: Sep 15, 2021 Queries moved to module swad_browser_database. (315201 lines)
|
||||||
Version 21.3: Sep 15, 2021 New module swad_notification_database for database queries related to notifications. (315211 lines)
|
Version 21.3: Sep 15, 2021 New module swad_notification_database for database queries related to notifications. (315211 lines)
|
||||||
Version 21.2.2: Sep 14, 2021 Queries moved to module swad_browser_database. (315051 lines)
|
Version 21.2.2: Sep 14, 2021 Queries moved to module swad_browser_database. (315051 lines)
|
||||||
Version 21.2.1: Sep 14, 2021 Queries moved to module swad_browser_database. (315003 lines)
|
Version 21.2.1: Sep 14, 2021 Queries moved to module swad_browser_database. (315003 lines)
|
||||||
|
|
|
@ -88,10 +88,10 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
||||||
unsigned NumCrss,MYSQL_RES *mysql_res);
|
unsigned NumCrss,MYSQL_RES *mysql_res);
|
||||||
static unsigned Ind_GetAndUpdateNumIndicatorsCrs (long CrsCod);
|
static unsigned Ind_GetAndUpdateNumIndicatorsCrs (long CrsCod);
|
||||||
static void Ind_StoreIndicatorsCrsIntoDB (long CrsCod,unsigned NumIndicators);
|
static void Ind_StoreIndicatorsCrsIntoDB (long CrsCod,unsigned NumIndicators);
|
||||||
static unsigned Ind_GetNumFilesInDocumZonesOfCrsFromDB (long CrsCod);
|
static unsigned Brw_DB_GetNumFilesInDocumZonesOfCrs (long CrsCod);
|
||||||
static unsigned Ind_GetNumFilesInShareZonesOfCrsFromDB (long CrsCod);
|
static unsigned Brw_DB_GetNumFilesInShareZonesOfCrs (long CrsCod);
|
||||||
static unsigned Ind_GetNumFilesInAssigZonesOfCrsFromDB (long CrsCod);
|
static unsigned Brw_DB_GetNumFilesInAssigZonesOfCrs (long CrsCod);
|
||||||
static unsigned Ind_GetNumFilesInWorksZonesOfCrsFromDB (long CrsCod);
|
static unsigned Brw_DB_GetNumFilesInWorksZonesOfCrs (long CrsCod);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************* Request showing statistics of courses *******************/
|
/******************* Request showing statistics of courses *******************/
|
||||||
|
@ -1427,8 +1427,8 @@ void Ind_ComputeAndStoreIndicatorsCrs (long CrsCod,int NumIndicatorsFromDB,
|
||||||
IndicatorsCrs->NumIndicators = 0;
|
IndicatorsCrs->NumIndicators = 0;
|
||||||
|
|
||||||
/***** Get whether download zones are empty or not *****/
|
/***** Get whether download zones are empty or not *****/
|
||||||
IndicatorsCrs->NumFilesInDocumentZones = Ind_GetNumFilesInDocumZonesOfCrsFromDB (CrsCod);
|
IndicatorsCrs->NumFilesInDocumentZones = Brw_DB_GetNumFilesInDocumZonesOfCrs (CrsCod);
|
||||||
IndicatorsCrs->NumFilesInSharedZones = Ind_GetNumFilesInShareZonesOfCrsFromDB (CrsCod);
|
IndicatorsCrs->NumFilesInSharedZones = Brw_DB_GetNumFilesInShareZonesOfCrs (CrsCod);
|
||||||
|
|
||||||
/***** Indicator #1: information about syllabus *****/
|
/***** Indicator #1: information about syllabus *****/
|
||||||
IndicatorsCrs->SyllabusLecSrc = Inf_GetInfoSrcFromDB (CrsCod,Inf_LECTURES);
|
IndicatorsCrs->SyllabusLecSrc = Inf_GetInfoSrcFromDB (CrsCod,Inf_LECTURES);
|
||||||
|
@ -1442,8 +1442,8 @@ void Ind_ComputeAndStoreIndicatorsCrs (long CrsCod,int NumIndicatorsFromDB,
|
||||||
|
|
||||||
/***** Indicator #2: information about assignments *****/
|
/***** Indicator #2: information about assignments *****/
|
||||||
IndicatorsCrs->NumAssignments = Asg_DB_GetNumAssignmentsInCrs (CrsCod);
|
IndicatorsCrs->NumAssignments = Asg_DB_GetNumAssignmentsInCrs (CrsCod);
|
||||||
IndicatorsCrs->NumFilesAssignments = Ind_GetNumFilesInAssigZonesOfCrsFromDB (CrsCod);
|
IndicatorsCrs->NumFilesAssignments = Brw_DB_GetNumFilesInAssigZonesOfCrs (CrsCod);
|
||||||
IndicatorsCrs->NumFilesWorks = Ind_GetNumFilesInWorksZonesOfCrsFromDB (CrsCod);
|
IndicatorsCrs->NumFilesWorks = Brw_DB_GetNumFilesInWorksZonesOfCrs (CrsCod);
|
||||||
IndicatorsCrs->ThereAreAssignments = (IndicatorsCrs->NumAssignments != 0) ||
|
IndicatorsCrs->ThereAreAssignments = (IndicatorsCrs->NumAssignments != 0) ||
|
||||||
(IndicatorsCrs->NumFilesAssignments != 0) ||
|
(IndicatorsCrs->NumFilesAssignments != 0) ||
|
||||||
(IndicatorsCrs->NumFilesWorks != 0);
|
(IndicatorsCrs->NumFilesWorks != 0);
|
||||||
|
@ -1488,9 +1488,9 @@ void Ind_ComputeAndStoreIndicatorsCrs (long CrsCod,int NumIndicatorsFromDB,
|
||||||
/*********** Get the number of files in document zones of a course ***********/
|
/*********** Get the number of files in document zones of a course ***********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static unsigned Ind_GetNumFilesInDocumZonesOfCrsFromDB (long CrsCod)
|
static unsigned Brw_DB_GetNumFilesInDocumZonesOfCrs (long CrsCod)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
|
|
||||||
/***** Get number of files in document zones of a course from database *****/
|
/***** Get number of files in document zones of a course from database *****/
|
||||||
return DB_QuerySELECTUnsigned ("can not get the number of files",
|
return DB_QuerySELECTUnsigned ("can not get the number of files",
|
||||||
|
@ -1506,19 +1506,19 @@ static unsigned Ind_GetNumFilesInDocumZonesOfCrsFromDB (long CrsCod)
|
||||||
" AND grp_types.GrpTypCod=grp_groups.GrpTypCod"
|
" AND grp_types.GrpTypCod=grp_groups.GrpTypCod"
|
||||||
" AND brw_sizes.FileBrowser=%u"
|
" AND brw_sizes.FileBrowser=%u"
|
||||||
" AND brw_sizes.Cod=grp_groups.GrpCod)",
|
" AND brw_sizes.Cod=grp_groups.GrpCod)",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_DOC_CRS],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Brw_ADMI_DOC_CRS],
|
||||||
CrsCod,
|
CrsCod,
|
||||||
CrsCod,
|
CrsCod,
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_DOC_GRP]);
|
(unsigned) Brw_DB_FileBrowserForDB_files[Brw_ADMI_DOC_GRP]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*********** Get the number of files in shared zones of a course ***********/
|
/*********** Get the number of files in shared zones of a course ***********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static unsigned Ind_GetNumFilesInShareZonesOfCrsFromDB (long CrsCod)
|
static unsigned Brw_DB_GetNumFilesInShareZonesOfCrs (long CrsCod)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
|
|
||||||
/***** Get number of files in document zones of a course from database *****/
|
/***** Get number of files in document zones of a course from database *****/
|
||||||
return DB_QuerySELECTUnsigned ("can not get the number of files",
|
return DB_QuerySELECTUnsigned ("can not get the number of files",
|
||||||
|
@ -1534,19 +1534,19 @@ static unsigned Ind_GetNumFilesInShareZonesOfCrsFromDB (long CrsCod)
|
||||||
" AND grp_types.GrpTypCod=grp_groups.GrpTypCod"
|
" AND grp_types.GrpTypCod=grp_groups.GrpTypCod"
|
||||||
" AND brw_sizes.FileBrowser=%u"
|
" AND brw_sizes.FileBrowser=%u"
|
||||||
" AND brw_sizes.Cod=grp_groups.GrpCod)",
|
" AND brw_sizes.Cod=grp_groups.GrpCod)",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_SHR_CRS],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Brw_ADMI_SHR_CRS],
|
||||||
CrsCod,
|
CrsCod,
|
||||||
CrsCod,
|
CrsCod,
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_SHR_GRP]);
|
(unsigned) Brw_DB_FileBrowserForDB_files[Brw_ADMI_SHR_GRP]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********* Get the number of files in assignment zones of a course ***********/
|
/********* Get the number of files in assignment zones of a course ***********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static unsigned Ind_GetNumFilesInAssigZonesOfCrsFromDB (long CrsCod)
|
static unsigned Brw_DB_GetNumFilesInAssigZonesOfCrs (long CrsCod)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
|
|
||||||
/***** Get number of files in document zones of a course from database *****/
|
/***** Get number of files in document zones of a course from database *****/
|
||||||
return DB_QuerySELECTUnsigned ("can not get the number of files",
|
return DB_QuerySELECTUnsigned ("can not get the number of files",
|
||||||
|
@ -1554,7 +1554,7 @@ static unsigned Ind_GetNumFilesInAssigZonesOfCrsFromDB (long CrsCod)
|
||||||
" FROM brw_sizes"
|
" FROM brw_sizes"
|
||||||
" WHERE FileBrowser=%u"
|
" WHERE FileBrowser=%u"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_ASG_USR],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Brw_ADMI_ASG_USR],
|
||||||
CrsCod);
|
CrsCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1562,9 +1562,9 @@ static unsigned Ind_GetNumFilesInAssigZonesOfCrsFromDB (long CrsCod)
|
||||||
/************* Get the number of files in works zones of a course ************/
|
/************* Get the number of files in works zones of a course ************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static unsigned Ind_GetNumFilesInWorksZonesOfCrsFromDB (long CrsCod)
|
static unsigned Brw_DB_GetNumFilesInWorksZonesOfCrs (long CrsCod)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
|
|
||||||
/***** Get number of files in document zones of a course from database *****/
|
/***** Get number of files in document zones of a course from database *****/
|
||||||
return DB_QuerySELECTUnsigned ("can not get the number of files",
|
return DB_QuerySELECTUnsigned ("can not get the number of files",
|
||||||
|
@ -1572,6 +1572,6 @@ static unsigned Ind_GetNumFilesInWorksZonesOfCrsFromDB (long CrsCod)
|
||||||
" FROM brw_sizes"
|
" FROM brw_sizes"
|
||||||
" WHERE FileBrowser=%u"
|
" WHERE FileBrowser=%u"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_WRK_USR],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Brw_ADMI_WRK_USR],
|
||||||
CrsCod);
|
CrsCod);
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
||||||
|
|
||||||
static void Mrk_GetNumRowsHeaderAndFooter (struct MarksProperties *Marks)
|
static void Mrk_GetNumRowsHeaderAndFooter (struct MarksProperties *Marks)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
long Cod = Brw_GetCodForFileBrowser ();
|
long Cod = Brw_GetCodForFileBrowser ();
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
@ -191,7 +191,7 @@ static void Mrk_GetNumRowsHeaderAndFooter (struct MarksProperties *Marks)
|
||||||
" LIMIT 1", // On duplicate entries, get the more recent
|
" 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_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
Gbl.FileBrowser.FilFolLnk.Full) == 1)
|
Gbl.FileBrowser.FilFolLnk.Full) == 1)
|
||||||
{
|
{
|
||||||
|
@ -238,7 +238,7 @@ void Mrk_ChangeNumRowsFooter (void)
|
||||||
|
|
||||||
static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
extern const char *Txt_The_number_of_rows_is_now_X;
|
extern const char *Txt_The_number_of_rows_is_now_X;
|
||||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
long Cod;
|
long Cod;
|
||||||
|
@ -262,7 +262,7 @@ static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
||||||
" AND brw_files.Path='%s'"
|
" AND brw_files.Path='%s'"
|
||||||
" AND brw_files.FilCod=mrk_marks.FilCod",
|
" AND brw_files.FilCod=mrk_marks.FilCod",
|
||||||
Mrk_HeadOrFootStr[HeaderOrFooter],NumRows,
|
Mrk_HeadOrFootStr[HeaderOrFooter],NumRows,
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
(unsigned) Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||||
Cod,
|
Cod,
|
||||||
Gbl.FileBrowser.FilFolLnk.Full);
|
Gbl.FileBrowser.FilFolLnk.Full);
|
||||||
|
|
||||||
|
|
|
@ -1049,8 +1049,8 @@ void Ntf_MarkNotifInCrsAsRemoved (long ToUsrCod,long CrsCod)
|
||||||
|
|
||||||
void Ntf_MarkNotifOneFileAsRemoved (const char *Path)
|
void Ntf_MarkNotifOneFileAsRemoved (const char *Path)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowser = Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||||
long FilCod;
|
long FilCod;
|
||||||
Ntf_NotifyEvent_t NotifyEvent;
|
Ntf_NotifyEvent_t NotifyEvent;
|
||||||
|
|
||||||
|
@ -1104,8 +1104,8 @@ void Ntf_MarkNotifOneFileAsRemoved (const char *Path)
|
||||||
|
|
||||||
void Ntf_MarkNotifChildrenOfFolderAsRemoved (const char *Path)
|
void Ntf_MarkNotifChildrenOfFolderAsRemoved (const char *Path)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowser = Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||||
Ntf_NotifyEvent_t NotifyEvent;
|
Ntf_NotifyEvent_t NotifyEvent;
|
||||||
|
|
||||||
switch (FileBrowser)
|
switch (FileBrowser)
|
||||||
|
|
|
@ -938,8 +938,8 @@ void Tml_Not_StoreAndPublishNoteInternal (Tml_Not_NoteType_t NoteType,long Cod,
|
||||||
|
|
||||||
void Tml_Not_MarkNoteOneFileAsUnavailable (const char *Path)
|
void Tml_Not_MarkNoteOneFileAsUnavailable (const char *Path)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowser = Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||||
long FilCod;
|
long FilCod;
|
||||||
Tml_Not_NoteType_t NoteType;
|
Tml_Not_NoteType_t NoteType;
|
||||||
|
|
||||||
|
@ -1001,8 +1001,8 @@ void Tml_Not_MarkNoteOneFileAsUnavailable (const char *Path)
|
||||||
|
|
||||||
void Tml_Not_MarkNotesChildrenOfFolderAsUnavailable (const char *Path)
|
void Tml_Not_MarkNotesChildrenOfFolderAsUnavailable (const char *Path)
|
||||||
{
|
{
|
||||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
extern const Brw_FileBrowser_t Brw_DB_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
Brw_FileBrowser_t FileBrowser = Brw_DB_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||||
Tml_Not_NoteType_t NoteType;
|
Tml_Not_NoteType_t NoteType;
|
||||||
|
|
||||||
switch (FileBrowser)
|
switch (FileBrowser)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user