mirror of https://github.com/acanas/swad-core.git
Version 21.3: Sep 15, 2021 New module swad_notification_database for database queries related to notifications.
This commit is contained in:
parent
ef9d714feb
commit
732e527430
6
Makefile
6
Makefile
|
@ -61,9 +61,9 @@ OBJS = swad_account.o swad_account_database.o swad_action.o swad_admin.o \
|
|||
swad_media.o swad_media_database.o swad_menu.o swad_message.o \
|
||||
swad_MFU.o \
|
||||
swad_network.o swad_nickname.o swad_notice.o swad_notification.o \
|
||||
swad_pagination.o swad_parameter.o swad_password.o swad_photo.o \
|
||||
swad_place.o swad_plugin.o swad_privacy.o swad_profile.o \
|
||||
swad_program.o swad_project.o \
|
||||
swad_notification_database.o swad_pagination.o swad_parameter.o \
|
||||
swad_password.o swad_photo.o swad_place.o swad_plugin.o swad_privacy.o \
|
||||
swad_profile.o swad_program.o swad_project.o \
|
||||
swad_QR.o \
|
||||
swad_record.o swad_report.o swad_role.o swad_room.o swad_RSS.o \
|
||||
swad_scope.o swad_search.o swad_session.o swad_setting.o \
|
||||
|
|
|
@ -105,6 +105,7 @@ cp -f /home/acanas/swad/swad/swad /var/www/cgi-bin/
|
|||
#include "swad_API.h"
|
||||
#include "swad_attendance_database.h"
|
||||
#include "swad_browser.h"
|
||||
#include "swad_browser_database.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_error.h"
|
||||
#include "swad_forum.h"
|
||||
|
@ -5623,7 +5624,7 @@ static bool API_WriteRowFileBrowser (unsigned Level,Brw_FileType_t FileType,cons
|
|||
|
||||
if (FileMetadata.FilCod <= 0) // No entry for this file in database table of files
|
||||
/* Add entry to the table of files/folders */
|
||||
FileMetadata.FilCod = Brw_AddPathToDB (-1L,FileMetadata.FilFolLnk.Type,
|
||||
FileMetadata.FilCod = Brw_DB_AddPath (-1L,FileMetadata.FilFolLnk.Type,
|
||||
Gbl.FileBrowser.FilFolLnk.Full,false,Brw_LICENSE_DEFAULT);
|
||||
|
||||
Gbl.Usrs.Other.UsrDat.UsrCod = FileMetadata.PublisherUsrCod;
|
||||
|
|
201
swad_browser.c
201
swad_browser.c
|
@ -1332,11 +1332,6 @@ static Brw_License_t Brw_GetParLicense (void);
|
|||
static void Brw_GetFileViewsFromLoggedUsrs (struct FileMetadata *FileMetadata);
|
||||
static unsigned Brw_GetFileViewsFromMe (long FilCod);
|
||||
|
||||
static void Brw_ChangeFileOrFolderHiddenInDB (const char Path[PATH_MAX + 1],bool IsHidden);
|
||||
|
||||
static void Brw_ChangeFilePublicInDB (struct FileMetadata *FileMetadata,
|
||||
bool IsPublic,Brw_License_t License);
|
||||
|
||||
static void Brw_RemoveOneFileOrFolderFromDB (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],
|
||||
|
@ -4504,7 +4499,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId,
|
|||
Brw_GetFileTypeSizeAndDate (&FileMetadata);
|
||||
if (FileMetadata.FilCod <= 0) // No entry for this file in database table of files
|
||||
/* Add entry to the table of files/folders */
|
||||
FileMetadata.FilCod = Brw_AddPathToDB (-1L,FileMetadata.FilFolLnk.Type,
|
||||
FileMetadata.FilCod = Brw_DB_AddPath (-1L,FileMetadata.FilFolLnk.Type,
|
||||
Gbl.FileBrowser.FilFolLnk.Full,false,Brw_LICENSE_DEFAULT);
|
||||
|
||||
/***** Is this row public or private? *****/
|
||||
|
@ -6721,7 +6716,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
Fil_FastCopyOfFiles (PathOrg,PathDstWithFile);
|
||||
|
||||
/***** Add entry to the table of files/folders *****/
|
||||
FilCod = Brw_AddPathToDB (Gbl.Usrs.Me.UsrDat.UsrCod,FileType,
|
||||
FilCod = Brw_DB_AddPath (Gbl.Usrs.Me.UsrDat.UsrCod,FileType,
|
||||
PathDstInTreeWithFile,false,Brw_LICENSE_DEFAULT);
|
||||
if (*FirstFilCod <= 0)
|
||||
*FirstFilCod = FilCod;
|
||||
|
@ -6763,7 +6758,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
Err_ShowErrorAndExit ("Can not create folder.");
|
||||
|
||||
/* Add entry to the table of files/folders */
|
||||
Brw_AddPathToDB (Gbl.Usrs.Me.UsrDat.UsrCod,FileType,
|
||||
Brw_DB_AddPath (Gbl.Usrs.Me.UsrDat.UsrCod,FileType,
|
||||
PathDstInTreeWithFile,false,Brw_LICENSE_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
@ -7158,7 +7153,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
"%s/%s",
|
||||
Gbl.FileBrowser.FilFolLnk.Full,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
Brw_AddPathToDB (Gbl.Usrs.Me.UsrDat.UsrCod,Brw_IS_FOLDER,
|
||||
Brw_DB_AddPath (Gbl.Usrs.Me.UsrDat.UsrCod,Brw_IS_FOLDER,
|
||||
PathCompleteInTreeIncludingFolder,false,Brw_LICENSE_DEFAULT);
|
||||
|
||||
/* The folder has been created sucessfully */
|
||||
|
@ -7468,7 +7463,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType)
|
|||
"%s/%s",
|
||||
Gbl.FileBrowser.FilFolLnk.Full,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
FilCod = Brw_AddPathToDB (Gbl.Usrs.Me.UsrDat.UsrCod,Brw_IS_FILE,
|
||||
FilCod = Brw_DB_AddPath (Gbl.Usrs.Me.UsrDat.UsrCod,Brw_IS_FILE,
|
||||
PathCompleteInTreeIncludingFile,false,Brw_LICENSE_DEFAULT);
|
||||
|
||||
/* Show message of confirmation */
|
||||
|
@ -7650,7 +7645,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
sizeof (PathCompleteInTreeIncludingFile),
|
||||
"%s/%s.url",
|
||||
Gbl.FileBrowser.FilFolLnk.Full,FileName);
|
||||
FilCod = Brw_AddPathToDB (Gbl.Usrs.Me.UsrDat.UsrCod,Brw_IS_LINK,
|
||||
FilCod = Brw_DB_AddPath (Gbl.Usrs.Me.UsrDat.UsrCod,Brw_IS_LINK,
|
||||
PathCompleteInTreeIncludingFile,false,Brw_LICENSE_DEFAULT);
|
||||
|
||||
/* Show message of confirmation */
|
||||
|
@ -7780,7 +7775,7 @@ void Brw_SetDocumentAsVisible (void)
|
|||
/***** Change file to visible *****/
|
||||
if (Brw_CheckIfFileOrFolderIsSetAsHiddenInDB (Gbl.FileBrowser.FilFolLnk.Type,
|
||||
Gbl.FileBrowser.FilFolLnk.Full))
|
||||
Brw_ChangeFileOrFolderHiddenInDB (Gbl.FileBrowser.FilFolLnk.Full,false);
|
||||
Brw_DB_ChangeFileOrFolderHidden (Gbl.FileBrowser.FilFolLnk.Full,false);
|
||||
|
||||
/***** Remove the affected clipboards *****/
|
||||
Brw_DB_RemoveAffectedClipboards (Gbl.FileBrowser.Type,
|
||||
|
@ -7804,7 +7799,7 @@ void Brw_SetDocumentAsHidden (void)
|
|||
set it as hidden *****/
|
||||
if (!Brw_CheckIfFileOrFolderIsSetAsHiddenInDB (Gbl.FileBrowser.FilFolLnk.Type,
|
||||
Gbl.FileBrowser.FilFolLnk.Full))
|
||||
Brw_ChangeFileOrFolderHiddenInDB (Gbl.FileBrowser.FilFolLnk.Full,true);
|
||||
Brw_DB_ChangeFileOrFolderHidden (Gbl.FileBrowser.FilFolLnk.Full,true);
|
||||
|
||||
/***** Remove the affected clipboards *****/
|
||||
Brw_DB_RemoveAffectedClipboards (Gbl.FileBrowser.Type,
|
||||
|
@ -7835,7 +7830,7 @@ bool Brw_CheckIfFileOrFolderIsSetAsHiddenInDB (Brw_FileType_t FileType,const cha
|
|||
IsHidden = (row[0][0] == 'Y');
|
||||
}
|
||||
else
|
||||
Brw_AddPathToDB (-1L,FileType,
|
||||
Brw_DB_AddPath (-1L,FileType,
|
||||
Gbl.FileBrowser.FilFolLnk.Full,false,Brw_LICENSE_DEFAULT);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
|
@ -7894,7 +7889,7 @@ void Brw_ShowFileMetadata (void)
|
|||
{
|
||||
if (FileMetadata.FilCod <= 0) // No entry for this file in database table of files
|
||||
/* Add entry to the table of files/folders */
|
||||
FileMetadata.FilCod = Brw_AddPathToDB (-1L,FileMetadata.FilFolLnk.Type,
|
||||
FileMetadata.FilCod = Brw_DB_AddPath (-1L,FileMetadata.FilFolLnk.Type,
|
||||
FileMetadata.FilFolLnk.Full,
|
||||
false,Brw_LICENSE_DEFAULT);
|
||||
|
||||
|
@ -8294,7 +8289,7 @@ void Brw_DownloadFile (void)
|
|||
{
|
||||
if (FileMetadata.FilCod <= 0) // No entry for this file in database table of files
|
||||
/* Add entry to the table of files/folders */
|
||||
FileMetadata.FilCod = Brw_AddPathToDB (-1L,FileMetadata.FilFolLnk.Type,
|
||||
FileMetadata.FilCod = Brw_DB_AddPath (-1L,FileMetadata.FilFolLnk.Type,
|
||||
Gbl.FileBrowser.FilFolLnk.Full,
|
||||
false,Brw_LICENSE_DEFAULT);
|
||||
|
||||
|
@ -8706,7 +8701,7 @@ void Brw_ChgFileMetadata (void)
|
|||
}
|
||||
|
||||
/***** Change file metadata *****/
|
||||
Brw_ChangeFilePublicInDB (&FileMetadata,PublicFileAfterEdition,License);
|
||||
Brw_DB_ChangeFilePublic (&FileMetadata,PublicFileAfterEdition,License);
|
||||
|
||||
/***** Remove the affected clipboards *****/
|
||||
Brw_DB_RemoveAffectedClipboards (Gbl.FileBrowser.Type,
|
||||
|
@ -9184,63 +9179,6 @@ static unsigned Brw_GetFileViewsFromMe (long FilCod)
|
|||
return NumMyViews;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Change hiddeness of file in the database ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Brw_ChangeFileOrFolderHiddenInDB (const char Path[PATH_MAX + 1],bool IsHidden)
|
||||
{
|
||||
long Cod = Brw_GetCodForFileBrowser ();
|
||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
|
||||
/***** Mark file as hidden in database *****/
|
||||
DB_QueryUPDATE ("can not change status of a file in database",
|
||||
"UPDATE brw_files"
|
||||
" SET Hidden='%c'"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND ZoneUsrCod=%ld"
|
||||
" AND Path='%s'",
|
||||
IsHidden ? 'Y' :
|
||||
'N',
|
||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||
Cod,ZoneUsrCod,
|
||||
Path);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******* Change publisher, public and license of file in the database ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Brw_ChangeFilePublicInDB (struct FileMetadata *FileMetadata,
|
||||
bool IsPublic,Brw_License_t License)
|
||||
{
|
||||
long Cod = Brw_GetCodForFileBrowser ();
|
||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
|
||||
/***** Trivial check *****/
|
||||
if (FileMetadata->FilCod <= 0)
|
||||
return;
|
||||
|
||||
/***** Change publisher, public and license of file in database *****/
|
||||
DB_QueryUPDATE ("can not change metadata of a file in database",
|
||||
"UPDATE brw_files"
|
||||
" SET Public='%c',"
|
||||
"License=%u"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND ZoneUsrCod=%ld"
|
||||
" AND FilCod=%ld"
|
||||
" AND Path='%s'",
|
||||
IsPublic ? 'Y' :
|
||||
'N',
|
||||
(unsigned) License,
|
||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||
Cod,ZoneUsrCod,
|
||||
FileMetadata->FilCod,
|
||||
FileMetadata->FilFolLnk.Full);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******** Get code of user in assignment / works for expanded folders ********/
|
||||
/*****************************************************************************/
|
||||
|
@ -9342,139 +9280,38 @@ void Brw_GetCrsGrpFromFileMetadata (Brw_FileBrowser_t FileBrowser,long Cod,
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Add a path of file/folder to the database ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
long Brw_AddPathToDB (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||
const char *FullPathInTree,bool IsPublic,Brw_License_t License)
|
||||
{
|
||||
long Cod = Brw_GetCodForFileBrowser ();
|
||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
|
||||
/***** Add path to the database *****/
|
||||
return
|
||||
DB_QueryINSERTandReturnCode ("can not add path to database",
|
||||
"INSERT INTO brw_files"
|
||||
" (FileBrowser,Cod,ZoneUsrCod,PublisherUsrCod,"
|
||||
"FileType,Path,Hidden,Public,License)"
|
||||
" VALUES"
|
||||
" (%u,%ld,%ld,%ld,"
|
||||
"%u,'%s','N','%c',%u)",
|
||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||
Cod,ZoneUsrCod,
|
||||
PublisherUsrCod,
|
||||
(unsigned) FileType,
|
||||
FullPathInTree,
|
||||
IsPublic ? 'Y' :
|
||||
'N',
|
||||
(unsigned) License);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Remove a file or folder from the database ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Brw_RemoveOneFileOrFolderFromDB (const char Path[PATH_MAX + 1])
|
||||
{
|
||||
long Cod = Brw_GetCodForFileBrowser ();
|
||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||
|
||||
/***** Set possible notifications as removed.
|
||||
Set possible social note as unavailable.
|
||||
Important: do this before removing from files *****/
|
||||
Ntf_MarkNotifOneFileAsRemoved (Path);
|
||||
Tml_Not_MarkNoteOneFileAsUnavailable (Path);
|
||||
|
||||
/***** Remove from database the entries that store the marks properties *****/
|
||||
if (FileBrowser == Brw_ADMI_MRK_CRS ||
|
||||
FileBrowser == Brw_ADMI_MRK_GRP)
|
||||
DB_QueryDELETE ("can not remove properties of marks from database",
|
||||
"DELETE FROM mrk_marks"
|
||||
" USING brw_files,"
|
||||
"mrk_marks"
|
||||
" WHERE brw_files.FileBrowser=%u"
|
||||
" AND brw_files.Cod=%ld"
|
||||
" AND brw_files.Path='%s'"
|
||||
" AND brw_files.FilCod=mrk_marks.FilCod",
|
||||
(unsigned) FileBrowser,
|
||||
Cod,
|
||||
Path);
|
||||
|
||||
/***** Remove from database the entries that store the file views *****/
|
||||
DB_QueryDELETE ("can not remove file views from database",
|
||||
"DELETE FROM brw_views"
|
||||
" USING brw_files,"
|
||||
"brw_views"
|
||||
" WHERE brw_files.FileBrowser=%u"
|
||||
" AND brw_files.Cod=%ld"
|
||||
" AND brw_files.ZoneUsrCod=%ld"
|
||||
" AND brw_files.Path='%s'"
|
||||
" AND brw_files.FilCod=brw_views.FilCod",
|
||||
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
||||
|
||||
/***** Remove from database the entry that stores the data of a file *****/
|
||||
DB_QueryDELETE ("can not remove path from database",
|
||||
"DELETE FROM brw_files"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND ZoneUsrCod=%ld"
|
||||
" AND Path='%s'",
|
||||
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
||||
/***** Remove from database the entries that store
|
||||
the marks properties, file views and file data *****/
|
||||
Brw_DB_RemoveOneFileOrFolder (Path);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Remove children of a folder from the database ****************/
|
||||
/*************** Remove children of a folder from the database ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Brw_RemoveChildrenOfFolderFromDB (const char Path[PATH_MAX + 1])
|
||||
{
|
||||
long Cod = Brw_GetCodForFileBrowser ();
|
||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||
|
||||
/***** Set possible notifications as removed.
|
||||
Set possible social notes as unavailable.
|
||||
Important: do this before removing from files *****/
|
||||
Ntf_MarkNotifChildrenOfFolderAsRemoved (Path);
|
||||
Tml_Not_MarkNotesChildrenOfFolderAsUnavailable (Path);
|
||||
|
||||
/***** Remove from database the entries that store the marks properties *****/
|
||||
if (FileBrowser == Brw_ADMI_MRK_CRS ||
|
||||
FileBrowser == Brw_ADMI_MRK_GRP)
|
||||
DB_QueryDELETE ("can not remove properties of marks from database",
|
||||
"DELETE FROM mrk_marks"
|
||||
" USING brw_files,"
|
||||
"mrk_marks"
|
||||
" WHERE brw_files.FileBrowser=%u"
|
||||
" AND brw_files.Cod=%ld"
|
||||
" AND brw_files.Path LIKE '%s/%%'"
|
||||
" AND brw_files.FilCod=mrk_marks.FilCod",
|
||||
(unsigned) FileBrowser,
|
||||
Cod,
|
||||
Path);
|
||||
|
||||
/***** Remove from database the entries that store the file views *****/
|
||||
DB_QueryDELETE ("can not remove file views from database",
|
||||
"DELETE FROM brw_views"
|
||||
" USING brw_files,"
|
||||
"brw_views"
|
||||
" WHERE brw_files.FileBrowser=%u"
|
||||
" AND brw_files.Cod=%ld"
|
||||
" AND brw_files.ZoneUsrCod=%ld"
|
||||
" AND brw_files.Path LIKE '%s/%%'"
|
||||
" AND brw_files.FilCod=brw_views.FilCod",
|
||||
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
||||
|
||||
/***** Remove from database the entries that store the data of files *****/
|
||||
DB_QueryDELETE ("can not remove paths from database",
|
||||
"DELETE FROM brw_files"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND ZoneUsrCod=%ld"
|
||||
" AND Path LIKE '%s/%%'",
|
||||
(unsigned) FileBrowser,Cod,ZoneUsrCod,Path);
|
||||
/***** Remove from database the entries that store
|
||||
the marks properties, file views and file data *****/
|
||||
Brw_DB_RemoveChildrenOfFolder (Path);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -225,10 +225,6 @@ void Brw_GetCrsGrpFromFileMetadata (Brw_FileBrowser_t FileBrowser,long Cod,
|
|||
long *CrsCod,
|
||||
long *GrpCod);
|
||||
|
||||
long Brw_AddPathToDB (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||
const char *FullPathInTree,
|
||||
bool IsPublic,Brw_License_t License);
|
||||
|
||||
bool Brw_CheckIfICanViewProjectFiles (long PrjCod);
|
||||
|
||||
long Brw_GetCodForFileBrowser (void);
|
||||
|
|
|
@ -165,6 +165,36 @@ static const Brw_FileBrowser_t Brw_FileBrowserForDB_expanded_folders[Brw_NUM_TYP
|
|||
/**************************** Private prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Add a path of file/folder to the database ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
long Brw_DB_AddPath (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||
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 ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
|
||||
/***** Add path to the database *****/
|
||||
return
|
||||
DB_QueryINSERTandReturnCode ("can not add path to database",
|
||||
"INSERT INTO brw_files"
|
||||
" (FileBrowser,Cod,ZoneUsrCod,PublisherUsrCod,"
|
||||
"FileType,Path,Hidden,Public,License)"
|
||||
" VALUES"
|
||||
" (%u,%ld,%ld,%ld,"
|
||||
"%u,'%s','N','%c',%u)",
|
||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||
Cod,ZoneUsrCod,
|
||||
PublisherUsrCod,
|
||||
(unsigned) FileType,
|
||||
FullPathInTree,
|
||||
IsPublic ? 'Y' :
|
||||
'N',
|
||||
(unsigned) License);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Get file code using its path ************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -271,6 +301,114 @@ unsigned Brw_DB_GetNumFilesUsr (long UsrCod)
|
|||
(unsigned) Brw_IS_UNKNOWN); // Unknown entries are counted as files
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Remove a file or folder from the database ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
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 ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||
|
||||
/***** Remove from database the entries that store the marks properties *****/
|
||||
if (FileBrowser == Brw_ADMI_MRK_CRS ||
|
||||
FileBrowser == Brw_ADMI_MRK_GRP)
|
||||
DB_QueryDELETE ("can not remove properties of marks from database",
|
||||
"DELETE FROM mrk_marks"
|
||||
" USING brw_files,"
|
||||
"mrk_marks"
|
||||
" WHERE brw_files.FileBrowser=%u"
|
||||
" AND brw_files.Cod=%ld"
|
||||
" AND brw_files.Path='%s'"
|
||||
" AND brw_files.FilCod=mrk_marks.FilCod",
|
||||
(unsigned) FileBrowser,
|
||||
Cod,
|
||||
Path);
|
||||
|
||||
/***** Remove from database the entries that store the file views *****/
|
||||
DB_QueryDELETE ("can not remove file views from database",
|
||||
"DELETE FROM brw_views"
|
||||
" USING brw_files,"
|
||||
"brw_views"
|
||||
" WHERE brw_files.FileBrowser=%u"
|
||||
" AND brw_files.Cod=%ld"
|
||||
" AND brw_files.ZoneUsrCod=%ld"
|
||||
" AND brw_files.Path='%s'"
|
||||
" AND brw_files.FilCod=brw_views.FilCod",
|
||||
(unsigned) FileBrowser,
|
||||
Cod,
|
||||
ZoneUsrCod,
|
||||
Path);
|
||||
|
||||
/***** Remove from database the entry that stores the data of a file *****/
|
||||
DB_QueryDELETE ("can not remove path from database",
|
||||
"DELETE FROM brw_files"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND ZoneUsrCod=%ld"
|
||||
" AND Path='%s'",
|
||||
(unsigned) FileBrowser,
|
||||
Cod,
|
||||
ZoneUsrCod,
|
||||
Path);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Remove children of a folder from the database ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
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 ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||
|
||||
/***** Remove from database the entries that store the marks properties *****/
|
||||
if (FileBrowser == Brw_ADMI_MRK_CRS ||
|
||||
FileBrowser == Brw_ADMI_MRK_GRP)
|
||||
DB_QueryDELETE ("can not remove properties of marks from database",
|
||||
"DELETE FROM mrk_marks"
|
||||
" USING brw_files,"
|
||||
"mrk_marks"
|
||||
" WHERE brw_files.FileBrowser=%u"
|
||||
" AND brw_files.Cod=%ld"
|
||||
" AND brw_files.Path LIKE '%s/%%'"
|
||||
" AND brw_files.FilCod=mrk_marks.FilCod",
|
||||
(unsigned) FileBrowser,
|
||||
Cod,
|
||||
Path);
|
||||
|
||||
/***** Remove from database the entries that store the file views *****/
|
||||
DB_QueryDELETE ("can not remove file views from database",
|
||||
"DELETE FROM brw_views"
|
||||
" USING brw_files,"
|
||||
"brw_views"
|
||||
" WHERE brw_files.FileBrowser=%u"
|
||||
" AND brw_files.Cod=%ld"
|
||||
" AND brw_files.ZoneUsrCod=%ld"
|
||||
" AND brw_files.Path LIKE '%s/%%'"
|
||||
" AND brw_files.FilCod=brw_views.FilCod",
|
||||
(unsigned) FileBrowser,
|
||||
Cod,
|
||||
ZoneUsrCod,
|
||||
Path);
|
||||
|
||||
/***** Remove from database the entries that store the data of files *****/
|
||||
DB_QueryDELETE ("can not remove paths from database",
|
||||
"DELETE FROM brw_files"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND ZoneUsrCod=%ld"
|
||||
" AND Path LIKE '%s/%%'",
|
||||
(unsigned) FileBrowser,
|
||||
Cod,
|
||||
ZoneUsrCod,
|
||||
Path);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******** Remove files related to an institution from the database ***********/
|
||||
/*****************************************************************************/
|
||||
|
@ -1088,6 +1226,41 @@ void Brw_DB_RemoveUsrFiles (long UsrCod)
|
|||
UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************ Change public and license of file in the database **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_DB_ChangeFilePublic (const struct FileMetadata *FileMetadata,
|
||||
bool IsPublic,Brw_License_t License)
|
||||
{
|
||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||
long Cod = Brw_GetCodForFileBrowser ();
|
||||
long ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
|
||||
/***** Trivial check *****/
|
||||
if (FileMetadata->FilCod <= 0)
|
||||
return;
|
||||
|
||||
/***** Change publisher, public and license of file in database *****/
|
||||
DB_QueryUPDATE ("can not change metadata of a file in database",
|
||||
"UPDATE brw_files"
|
||||
" SET Public='%c',"
|
||||
"License=%u"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND ZoneUsrCod=%ld"
|
||||
" AND FilCod=%ld"
|
||||
" AND Path='%s'",
|
||||
IsPublic ? 'Y' :
|
||||
'N',
|
||||
(unsigned) License,
|
||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||
Cod,
|
||||
ZoneUsrCod,
|
||||
FileMetadata->FilCod,
|
||||
FileMetadata->FilFolLnk.Full);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********** Check if a folder contains file(s) marked as public *************/
|
||||
/*****************************************************************************/
|
||||
|
@ -1422,6 +1595,32 @@ unsigned Brw_DB_GetNumFileViewsUsr (long UsrCod)
|
|||
UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Change hiddeness of file in the database ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
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 ZoneUsrCod = Brw_GetZoneUsrCodForFileBrowser ();
|
||||
|
||||
/***** Mark file as hidden/unhidden in database *****/
|
||||
DB_QueryUPDATE ("can not change status of a file in database",
|
||||
"UPDATE brw_files"
|
||||
" SET Hidden='%c'"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND ZoneUsrCod=%ld"
|
||||
" AND Path='%s'",
|
||||
IsHidden ? 'Y' :
|
||||
'N',
|
||||
(unsigned) Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type],
|
||||
Cod,
|
||||
ZoneUsrCod,
|
||||
Path);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Check if a file / folder from is set as hidden ***************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -48,10 +48,14 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
//---------------------------------- Files ------------------------------------
|
||||
long Brw_DB_AddPath (long PublisherUsrCod,Brw_FileType_t FileType,
|
||||
const char *FullPathInTree,bool IsPublic,Brw_License_t License);
|
||||
long Brw_DB_GetFilCodByPath (const char *Path,bool OnlyIfPublic);
|
||||
unsigned Brw_DB_GetFileMetadataByPath (MYSQL_RES **mysql_res,const char *Path);
|
||||
unsigned Brw_DB_GetFileMetadataByCod (MYSQL_RES **mysql_res,long FilCod);
|
||||
unsigned Brw_DB_GetNumFilesUsr (long UsrCod);
|
||||
void Brw_DB_RemoveOneFileOrFolder (const char Path[PATH_MAX + 1]);
|
||||
void Brw_DB_RemoveChildrenOfFolder (const char Path[PATH_MAX + 1]);
|
||||
void Brw_DB_RemoveInsFiles (long InsCod);
|
||||
void Brw_DB_RemoveCtrFiles (long CtrCod);
|
||||
void Brw_DB_RemoveDegFiles (long DegCod);
|
||||
|
@ -63,6 +67,8 @@ void Brw_DB_RemoveWrkFiles (long CrsCod,long UsrCod);
|
|||
void Brw_DB_RemoveUsrFiles (long UsrCod);
|
||||
|
||||
//------------------------------ Public files ---------------------------------
|
||||
void Brw_DB_ChangeFilePublic (const struct FileMetadata *FileMetadata,
|
||||
bool IsPublic,Brw_License_t License);
|
||||
bool Brw_DB_GetIfFolderHasPublicFiles (const char Path[PATH_MAX + 1]);
|
||||
unsigned Brw_DB_GetNumPublicFilesUsr (long UsrCod);
|
||||
unsigned Brw_DB_GetNumberOfPublicFiles (MYSQL_RES **mysql_res,Brw_License_t License);
|
||||
|
@ -83,6 +89,7 @@ unsigned Brw_DB_GetFileViewsFromNonLoggedUsrs (long FilCod);
|
|||
unsigned Brw_DB_GetNumFileViewsUsr (long UsrCod);
|
||||
|
||||
//------------------------------- Hidden files --------------------------------
|
||||
void Brw_DB_ChangeFileOrFolderHidden (const char Path[PATH_MAX + 1],bool IsHidden);
|
||||
unsigned Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingPath (MYSQL_RES **mysql_res,
|
||||
const char *Path);
|
||||
bool Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingMetadata (const struct FileMetadata *FileMetadata);
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 21.2.2 (2021-09-14)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 21.3 (2021-09-15)"
|
||||
#define CSS_FILE "swad20.45.css"
|
||||
#define JS_FILE "swad20.69.1.js"
|
||||
/*
|
||||
TODO: Rename CENTRE to CENTER in help wiki.
|
||||
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
|
||||
|
||||
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.1: Sep 14, 2021 Queries moved to module swad_browser_database. (315003 lines)
|
||||
Version 21.2: Sep 14, 2021 Code refactoring related to file browsers. (314983 lines)
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include "swad_action.h"
|
||||
#include "swad_box.h"
|
||||
#include "swad_browser_database.h"
|
||||
#include "swad_call_for_exam.h"
|
||||
#include "swad_config.h"
|
||||
#include "swad_config.h"
|
||||
|
@ -51,6 +52,7 @@
|
|||
#include "swad_message.h"
|
||||
#include "swad_notice.h"
|
||||
#include "swad_notification.h"
|
||||
#include "swad_notification_database.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_survey.h"
|
||||
#include "swad_timeline.h"
|
||||
|
@ -965,7 +967,6 @@ void Ntf_MarkNotifAsSeen (Ntf_NotifyEvent_t NotifyEvent,long Cod,long CrsCod,lon
|
|||
|
||||
void Ntf_DB_MarkNotifAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod)
|
||||
{
|
||||
/***** Set notification as removed *****/
|
||||
DB_QueryUPDATE ("can not set notification(s) as removed",
|
||||
"UPDATE ntf_notifications"
|
||||
" SET Status=(Status | %u)"
|
||||
|
@ -1105,7 +1106,6 @@ void Ntf_MarkNotifChildrenOfFolderAsRemoved (const char *Path)
|
|||
{
|
||||
extern const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER];
|
||||
Brw_FileBrowser_t FileBrowser = Brw_FileBrowserForDB_files[Gbl.FileBrowser.Type];
|
||||
long Cod = Brw_GetCodForFileBrowser ();
|
||||
Ntf_NotifyEvent_t NotifyEvent;
|
||||
|
||||
switch (FileBrowser)
|
||||
|
@ -1140,20 +1140,9 @@ void Ntf_MarkNotifChildrenOfFolderAsRemoved (const char *Path)
|
|||
default:
|
||||
return;
|
||||
}
|
||||
DB_QueryUPDATE ("can not set notification(s) as removed",
|
||||
"UPDATE ntf_notifications"
|
||||
" SET Status=(Status | %u)"
|
||||
" WHERE NotifyEvent=%u"
|
||||
" AND Cod IN"
|
||||
" (SELECT FilCod"
|
||||
" FROM brw_files"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND Path LIKE '%s/%%')",
|
||||
(unsigned) Ntf_STATUS_BIT_REMOVED,
|
||||
(unsigned) NotifyEvent,
|
||||
(unsigned) FileBrowser,Cod,
|
||||
Path);
|
||||
Ntf_DB_MarkNotifChildrenOfFolderAsRemoved (NotifyEvent,FileBrowser,
|
||||
Brw_GetCodForFileBrowser (),
|
||||
Path);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
/********************************** Headers **********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
// #include "swad_browser.h"
|
||||
#include "swad_user.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -123,6 +124,7 @@ void Ntf_GetNotifSummaryAndContent (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
bool GetContent);
|
||||
void Ntf_MarkNotifAsSeen (Ntf_NotifyEvent_t NotifyEvent,long Cod,long CrsCod,long ToUsrCod);
|
||||
void Ntf_DB_MarkNotifAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod);
|
||||
|
||||
void Ntf_MarkNotifToOneUsrAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod,long ToUsrCod);
|
||||
void Ntf_MarkNotifInCrsAsRemoved (long ToUsrCod,long CrsCod);
|
||||
void Ntf_MarkNotifOneFileAsRemoved (const char *Path);
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
// swad_notification_database.c: notifications operations with database
|
||||
|
||||
/*
|
||||
SWAD (Shared Workspace At a Distance),
|
||||
is a web platform developed at the University of Granada (Spain),
|
||||
and used to support university teaching.
|
||||
|
||||
This file is part of SWAD core.
|
||||
Copyright (C) 1999-2021 Antonio Cañas Vargas
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*****************************************************************************/
|
||||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
// #include <stddef.h> // For NULL
|
||||
// #include <stdlib.h> // For system
|
||||
// #include <string.h>
|
||||
// #include <sys/wait.h> // For the macro WEXITSTATUS
|
||||
// #include <unistd.h> // For unlink
|
||||
|
||||
// #include "swad_action.h"
|
||||
// #include "swad_box.h"
|
||||
// #include "swad_call_for_exam.h"
|
||||
// #include "swad_config.h"
|
||||
// #include "swad_config.h"
|
||||
#include "swad_database.h"
|
||||
// #include "swad_enrolment.h"
|
||||
// #include "swad_error.h"
|
||||
// #include "swad_figure.h"
|
||||
// #include "swad_follow.h"
|
||||
// #include "swad_form.h"
|
||||
// #include "swad_forum.h"
|
||||
// #include "swad_global.h"
|
||||
// #include "swad_hierarchy.h"
|
||||
// #include "swad_hierarchy_level.h"
|
||||
// #include "swad_HTML.h"
|
||||
// #include "swad_mark.h"
|
||||
// #include "swad_message.h"
|
||||
// #include "swad_notice.h"
|
||||
// #include "swad_notification.h"
|
||||
#include "swad_notification_database.h"
|
||||
// #include "swad_parameter.h"
|
||||
// #include "swad_survey.h"
|
||||
// #include "swad_timeline.h"
|
||||
// #include "swad_timeline_notification.h"
|
||||
// #include "swad_timeline_publication.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
extern struct Globals Gbl;
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Private constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/************ Set possible notifications of children as removed **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ntf_DB_MarkNotifChildrenOfFolderAsRemoved (Ntf_NotifyEvent_t NotifyEvent,
|
||||
Brw_FileBrowser_t FileBrowser,
|
||||
long Cod,const char *Path)
|
||||
{
|
||||
DB_QueryUPDATE ("can not set notification(s) as removed",
|
||||
"UPDATE ntf_notifications"
|
||||
" SET Status=(Status | %u)"
|
||||
" WHERE NotifyEvent=%u"
|
||||
" AND Cod IN"
|
||||
" (SELECT FilCod"
|
||||
" FROM brw_files"
|
||||
" WHERE FileBrowser=%u"
|
||||
" AND Cod=%ld"
|
||||
" AND Path LIKE '%s/%%')",
|
||||
(unsigned) Ntf_STATUS_BIT_REMOVED,
|
||||
(unsigned) NotifyEvent,
|
||||
(unsigned) FileBrowser,
|
||||
Cod,
|
||||
Path);
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
// swad_notification.h: notifications about events, sent by email
|
||||
|
||||
#ifndef _SWAD_NTF_DB
|
||||
#define _SWAD_NTF_DB
|
||||
/*
|
||||
SWAD (Shared Workspace At a Distance in Spanish),
|
||||
is a web platform developed at the University of Granada (Spain),
|
||||
and used to support university teaching.
|
||||
|
||||
This file is part of SWAD core.
|
||||
Copyright (C) 1999-2021 Antonio Cañas Vargas
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*****************************************************************************/
|
||||
/********************************** Headers **********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_browser.h"
|
||||
#include "swad_notification.h"
|
||||
// #include "swad_user.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Public types *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ntf_DB_MarkNotifChildrenOfFolderAsRemoved (Ntf_NotifyEvent_t NotifyEvent,
|
||||
Brw_FileBrowser_t FileBrowser,
|
||||
long Cod,const char *Path);
|
||||
|
||||
#endif
|
|
@ -30,6 +30,7 @@
|
|||
#include <sys/types.h> // For mkdir
|
||||
|
||||
#include "swad_box.h"
|
||||
#include "swad_browser_database.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_error.h"
|
||||
#include "swad_form.h"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "swad_alert.h"
|
||||
#include "swad_box.h"
|
||||
#include "swad_browser_database.h"
|
||||
#include "swad_call_for_exam.h"
|
||||
#include "swad_course.h"
|
||||
#include "swad_forum.h"
|
||||
|
@ -1044,8 +1045,8 @@ void Tml_Not_MarkNotesChildrenOfFolderAsUnavailable (const char *Path)
|
|||
default:
|
||||
return;
|
||||
}
|
||||
Tml_DB_MarkNotesChildrenOfFolderAsUnavailable (NoteType,
|
||||
FileBrowser,Brw_GetCodForFileBrowser (),
|
||||
Tml_DB_MarkNotesChildrenOfFolderAsUnavailable (NoteType,FileBrowser,
|
||||
Brw_GetCodForFileBrowser (),
|
||||
Path);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "swad_box.h"
|
||||
#include "swad_browser.h"
|
||||
#include "swad_browser_database.h"
|
||||
#include "swad_config.h"
|
||||
#include "swad_error.h"
|
||||
#include "swad_form.h"
|
||||
|
|
Loading…
Reference in New Issue