From 0f8f8fc3969e7d21122dacae0576d8cf68bfd47a Mon Sep 17 00:00:00 2001 From: acanas Date: Mon, 18 Oct 2021 20:49:14 +0200 Subject: [PATCH] Version 21.35: Oct 18, 2021 New module swad_file_database for database queries related to files. --- Makefile | 6 +- swad_changelog.h | 3 +- swad_database.c | 2 +- swad_file.c | 52 ++++++++++++++++ swad_file.h | 7 +++ swad_file_database.c | 142 +++++++++++++++++++++++++++++++++++++++++++ swad_file_database.h | 52 ++++++++++++++++ swad_media.c | 50 +++++++-------- swad_session.c | 136 +---------------------------------------- swad_session.h | 11 ---- 10 files changed, 287 insertions(+), 174 deletions(-) create mode 100644 swad_file_database.c create mode 100644 swad_file_database.h diff --git a/Makefile b/Makefile index 932718c1..4f69feb0 100644 --- a/Makefile +++ b/Makefile @@ -48,9 +48,9 @@ OBJS = swad_account.o swad_account_database.o swad_action.o swad_admin.o \ swad_exam_database.o swad_exam_log.o swad_exam_print.o \ swad_exam_result.o swad_exam_session.o swad_exam_set.o \ swad_figure.o swad_figure_cache.o swad_figure_database.o swad_file.o \ - swad_file_extension.o swad_file_MIME.o swad_firewall.o \ - swad_firewall_database.o swad_follow.o swad_follow_database.o \ - swad_form.o swad_forum.o swad_forum_database.o \ + swad_file_database.o swad_file_extension.o swad_file_MIME.o \ + swad_firewall.o swad_firewall_database.o swad_follow.o \ + swad_follow_database.o swad_form.o swad_forum.o swad_forum_database.o \ swad_game.o swad_game_database.o swad_global.o swad_group.o \ swad_group_database.o swad_help.o swad_hierarchy.o \ swad_hierarchy_config.o swad_hierarchy_database.o swad_holiday.o \ diff --git a/swad_changelog.h b/swad_changelog.h index ddc58594..9f87c720 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -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.34 (2021-10-15)" +#define Log_PLATFORM_VERSION "SWAD 21.35 (2021-10-18)" #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.35: Oct 18, 2021 New module swad_file_database for database queries related to files. (320171 lines) Version 21.34: Oct 15, 2021 New module swad_session_database for database queries related to sessions. (320081 lines) Version 21.33.2: Oct 15, 2021 Fixed bug getting name of degree. (319950 lines) Version 21.33.1: Oct 15, 2021 Number of users/courses to show big-list warning increased from 500 to 1000. (319944 lines) diff --git a/swad_database.c b/swad_database.c index 1e3604a9..5cac5ee7 100644 --- a/swad_database.c +++ b/swad_database.c @@ -387,7 +387,7 @@ mysql> DESCRIBE brw_caches; 3 rows in set (0.01 sec) */ DB_CreateTable ("CREATE TABLE IF NOT EXISTS brw_caches (" - "SessionId CHAR(43) NOT NULL," // Cns_BYTES_SESSION_ID + "SessionId CHAR(43) NOT NULL," // Cns_BYTES_SESSION_ID "PrivPath VARCHAR(4096) COLLATE latin1_bin NOT NULL," // PATH_MAX "TmpPubDir VARCHAR(4096) COLLATE latin1_bin NOT NULL," // PATH_MAX "UNIQUE INDEX(SessionId))"); diff --git a/swad_file.c b/swad_file.c index 465fe5fa..3d9f8119 100644 --- a/swad_file.c +++ b/swad_file.c @@ -42,6 +42,7 @@ #include "swad_error.h" #include "swad_global.h" #include "swad_file.h" +#include "swad_file_database.h" #include "swad_string.h" /*****************************************************************************/ @@ -637,3 +638,54 @@ void Fil_WriteFileSizeFull (double SizeInBytes, snprintf (FileSizeStr,Fil_MAX_BYTES_FILE_SIZE_STRING + 1,"%.1f TiB", SizeInBytes / Ti); } + +/*****************************************************************************/ +/********* Add public directory used to link private path to cache ***********/ +/*****************************************************************************/ + +void Fil_AddPublicDirToCache (const char *FullPathPriv, + const char TmpPubDir[PATH_MAX + 1]) + { + if (Gbl.Session.IsOpen) + { + /* Delete possible old entry */ + Fil_DB_RemovePublicDirFromCache (FullPathPriv); + + /* Insert new entry */ + Fil_DB_AddPublicDirToCache (FullPathPriv,TmpPubDir); + } + } + +/*****************************************************************************/ +/******** Get public directory used to link private path from cache **********/ +/*****************************************************************************/ + +bool Fil_GetPublicDirFromCache (const char *FullPathPriv, + char TmpPubDir[PATH_MAX + 1]) + { + bool Cached; + bool TmpPubDirExists; + + /***** Reset temporary directory *****/ + TmpPubDir[0] = '\0'; + + if (Gbl.Session.IsOpen) + { + /***** Get temporary directory from cache *****/ + Fil_DB_GetPublicDirFromCache (FullPathPriv,TmpPubDir); + Cached = (TmpPubDir[0] != '\0'); + + /***** Check if temporary public directory exists *****/ + if (Cached) + { + /* If not exists (it could be deleted if its lifetime has expired) + ==> remove from cache */ + TmpPubDirExists = Fil_CheckIfPathExists (TmpPubDir); + if (!TmpPubDirExists) + Fil_DB_RemovePublicDirFromCache (FullPathPriv); + return TmpPubDirExists; + } + } + + return false; + } diff --git a/swad_file.h b/swad_file.h index 5abf7b4f..c8a31f52 100644 --- a/swad_file.h +++ b/swad_file.h @@ -93,4 +93,11 @@ void Fil_WriteFileSizeBrief (double SizeInBytes, void Fil_WriteFileSizeFull (double SizeInBytes, char FileSizeStr[Fil_MAX_BYTES_FILE_SIZE_STRING + 1]); +//------------------------------- File caches --------------------------------- + +void Fil_AddPublicDirToCache (const char *FullPathPriv, + const char TmpPubDir[PATH_MAX + 1]); +bool Fil_GetPublicDirFromCache (const char *FullPathPriv, + char TmpPubDir[PATH_MAX + 1]); + #endif diff --git a/swad_file_database.c b/swad_file_database.c new file mode 100644 index 00000000..8d3f9b1b --- /dev/null +++ b/swad_file_database.c @@ -0,0 +1,142 @@ +// swad_file_database.c: files, 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 . +*/ +/*****************************************************************************/ +/********************************* Headers ***********************************/ +/*****************************************************************************/ + +// #include // For isprint, isspace, etc. +// #include // For scandir, etc. +// #include // For errno +// #include // For PATH_MAX +// #include // For NULL +// #include // For FILE,fprintf +// #include // For exit, system, free, etc. +// #include // For string functions +// #include // For mkdir +// #include // For mkdir +// #include // For unlink + +// #include "swad_config.h" +#include "swad_database.h" +// #include "swad_error.h" +#include "swad_global.h" +#include "swad_file_database.h" +// #include "swad_string.h" + +/*****************************************************************************/ +/************** External global variables from others modules ****************/ +/*****************************************************************************/ + +extern struct Globals Gbl; + +/*****************************************************************************/ +/***************************** Private constants *****************************/ +/*****************************************************************************/ + +/*****************************************************************************/ +/******************************* Private types *******************************/ +/*****************************************************************************/ + +/*****************************************************************************/ +/***************************** Private variables *****************************/ +/*****************************************************************************/ + +/*****************************************************************************/ +/***************************** Private prototypes ****************************/ +/*****************************************************************************/ + +/*****************************************************************************/ +/********* Add public directory used to link private path to cache ***********/ +/*****************************************************************************/ + +void Fil_DB_AddPublicDirToCache (const char *FullPathPriv, + const char TmpPubDir[PATH_MAX + 1]) + { + DB_QueryINSERT ("can not cache file", + "INSERT INTO brw_caches" + " (SessionId,PrivPath,TmpPubDir)" + " VALUES" + " ('%s','%s','%s')", + Gbl.Session.Id, + FullPathPriv, + TmpPubDir); + } + +/*****************************************************************************/ +/******** Get public directory used to link private path from cache **********/ +/*****************************************************************************/ + +void Fil_DB_GetPublicDirFromCache (const char *FullPathPriv, + char TmpPubDir[PATH_MAX + 1]) + { + DB_QuerySELECTString (TmpPubDir,PATH_MAX,"can not get check if file is cached", + "SELECT TmpPubDir" + " FROM brw_caches" + " WHERE SessionId='%s'" + " AND PrivPath='%s'", + Gbl.Session.Id, + FullPathPriv); + } + +/*****************************************************************************/ +/******** Remove public directory used to link private path to cache *********/ +/*****************************************************************************/ + +void Fil_DB_RemovePublicDirFromCache (const char *FullPathPriv) + { + if (Gbl.Session.IsOpen) + DB_QueryDELETE ("can not remove cached file", + "DELETE FROM brw_caches" + " WHERE SessionId='%s'" + " AND PrivPath='%s'", + Gbl.Session.Id, + FullPathPriv); + } + +/*****************************************************************************/ +/****** Remove public directories used to link private paths from cache ******/ +/*****************************************************************************/ + +void Fil_DB_RemovePublicDirsCache (void) + { + if (Gbl.Session.IsOpen) + DB_QueryDELETE ("can not cache file", + "DELETE FROM brw_caches" + " WHERE SessionId='%s'", + Gbl.Session.Id); + } + +/*****************************************************************************/ +/****** Remove public directories used to link private paths from cache ******/ +/****** (from expired sessions) ******/ +/*****************************************************************************/ + +void Fil_DB_RemovePublicDirsFromExpiredSessions (void) + { + DB_QueryDELETE ("can not remove public directories in expired sessions", + "DELETE FROM brw_caches" + " WHERE SessionId NOT IN" + " (SELECT SessionId" + " FROM ses_sessions)"); + } diff --git a/swad_file_database.h b/swad_file_database.h new file mode 100644 index 00000000..c816947e --- /dev/null +++ b/swad_file_database.h @@ -0,0 +1,52 @@ +// swad_file_database.h: files, operations with database + +#ifndef _SWAD_FIL_DB +#define _SWAD_FIL_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 . +*/ +/*****************************************************************************/ +/********************************* Headers ***********************************/ +/*****************************************************************************/ + +#include // For PATH_MAX +// #include // For boolean type +// #include // For FILE +// #include // For time_t + +/*****************************************************************************/ +/************************** Public types and constants ***********************/ +/*****************************************************************************/ + +/*****************************************************************************/ +/***************************** Public prototypes *****************************/ +/*****************************************************************************/ + +//------------------------------- File caches --------------------------------- +void Fil_DB_AddPublicDirToCache (const char *FullPathPriv, + const char TmpPubDir[PATH_MAX + 1]); +void Fil_DB_GetPublicDirFromCache (const char *FullPathPriv, + char TmpPubDir[PATH_MAX + 1]); +void Fil_DB_RemovePublicDirFromCache (const char *FullPathPriv); +void Fil_DB_RemovePublicDirsCache (void); +void Fil_DB_RemovePublicDirsFromExpiredSessions (void); + +#endif diff --git a/swad_media.c b/swad_media.c index 3580b689..53afa7b4 100644 --- a/swad_media.c +++ b/swad_media.c @@ -1506,7 +1506,7 @@ static void Med_ShowJPG (const struct Med_Media *Media, if (Fil_CheckIfPathExists (FullPathJPGPriv)) { /***** Get cached public link to private file *****/ - Cached = Brw_GetPublicDirFromCache (FullPathJPGPriv,TmpPubDir); + Cached = Fil_GetPublicDirFromCache (FullPathJPGPriv,TmpPubDir); if (!Cached) { @@ -1517,7 +1517,7 @@ static void Med_ShowJPG (const struct Med_Media *Media, snprintf (TmpPubDir,sizeof (TmpPubDir),"%s/%s", Gbl.FileBrowser.TmpPubDir.L,Gbl.FileBrowser.TmpPubDir.R); - Brw_AddPublicDirToCache (FullPathJPGPriv,TmpPubDir); + Fil_AddPublicDirToCache (FullPathJPGPriv,TmpPubDir); } /***** Show media *****/ @@ -1570,7 +1570,7 @@ static void Med_ShowGIF (const struct Med_Media *Media, if (Fil_CheckIfPathExists (FullPathGIFPriv)) // The animated GIF image { /***** Get cached public link to private file *****/ - Cached = Brw_GetPublicDirFromCache (FullPathGIFPriv,TmpPubDir); + Cached = Fil_GetPublicDirFromCache (FullPathGIFPriv,TmpPubDir); if (!Cached) { @@ -1582,7 +1582,7 @@ static void Med_ShowGIF (const struct Med_Media *Media, snprintf (TmpPubDir,sizeof (TmpPubDir),"%s/%s", Gbl.FileBrowser.TmpPubDir.L,Gbl.FileBrowser.TmpPubDir.R); - Brw_AddPublicDirToCache (FullPathGIFPriv,TmpPubDir); + Fil_AddPublicDirToCache (FullPathGIFPriv,TmpPubDir); } /***** Create URLs pointing to symbolic links *****/ @@ -1658,7 +1658,7 @@ static void Med_ShowVideo (const struct Med_Media *Media, if (Fil_CheckIfPathExists (FullPathVideoPriv)) { /***** Get cached public link to private file *****/ - Cached = Brw_GetPublicDirFromCache (FullPathVideoPriv,TmpPubDir); + Cached = Fil_GetPublicDirFromCache (FullPathVideoPriv,TmpPubDir); if (!Cached) { @@ -1669,7 +1669,7 @@ static void Med_ShowVideo (const struct Med_Media *Media, snprintf (TmpPubDir,sizeof (TmpPubDir),"%s/%s", Gbl.FileBrowser.TmpPubDir.L,Gbl.FileBrowser.TmpPubDir.R); - Brw_AddPublicDirToCache (FullPathVideoPriv,TmpPubDir); + Fil_AddPublicDirToCache (FullPathVideoPriv,TmpPubDir); } /***** Create URL pointing to symbolic link *****/ @@ -1967,8 +1967,8 @@ void Med_RemoveMediaFromAllRows (unsigned NumMedia,MYSQL_RES *mysql_res) void Med_RemoveMedia (long MedCod) { - char PathMedPriv[PATH_MAX + 1]; - char *FullPathMediaPriv; + char PathPriv[PATH_MAX + 1]; + char *FullPathPriv; struct Med_Media Media; /***** Trivial case *****/ @@ -1993,7 +1993,7 @@ void Med_RemoveMedia (long MedCod) if (Media.Name[0]) { /***** Build path to private directory with the media *****/ - snprintf (PathMedPriv,sizeof (PathMedPriv),"%s/%c%c", + snprintf (PathPriv,sizeof (PathPriv),"%s/%c%c", Cfg_PATH_MEDIA_PRIVATE, Media.Name[0], Media.Name[1]); @@ -2003,37 +2003,37 @@ void Med_RemoveMedia (long MedCod) { case Med_JPG: /***** Remove private JPG file *****/ - if (asprintf (&FullPathMediaPriv,"%s/%s.%s", - PathMedPriv,Media.Name,Med_Extensions[Med_JPG]) < 0) + if (asprintf (&FullPathPriv,"%s/%s.%s", + PathPriv,Media.Name,Med_Extensions[Med_JPG]) < 0) Err_NotEnoughMemoryExit (); - unlink (FullPathMediaPriv); - free (FullPathMediaPriv); + unlink (FullPathPriv); + free (FullPathPriv); break; case Med_GIF: /***** Remove private GIF file *****/ - if (asprintf (&FullPathMediaPriv,"%s/%s.%s", - PathMedPriv,Media.Name,Med_Extensions[Med_GIF]) < 0) + if (asprintf (&FullPathPriv,"%s/%s.%s", + PathPriv,Media.Name,Med_Extensions[Med_GIF]) < 0) Err_NotEnoughMemoryExit (); - unlink (FullPathMediaPriv); - free (FullPathMediaPriv); + unlink (FullPathPriv); + free (FullPathPriv); /***** Remove private PNG file *****/ - if (asprintf (&FullPathMediaPriv,"%s/%s.png", - PathMedPriv,Media.Name) < 0) + if (asprintf (&FullPathPriv,"%s/%s.png", + PathPriv,Media.Name) < 0) Err_NotEnoughMemoryExit (); - unlink (FullPathMediaPriv); - free (FullPathMediaPriv); + unlink (FullPathPriv); + free (FullPathPriv); break; case Med_MP4: case Med_WEBM: case Med_OGG: /***** Remove private video file *****/ - if (asprintf (&FullPathMediaPriv,"%s/%s.%s", - PathMedPriv,Media.Name,Med_Extensions[Media.Type]) < 0) + if (asprintf (&FullPathPriv,"%s/%s.%s", + PathPriv,Media.Name,Med_Extensions[Media.Type]) < 0) Err_NotEnoughMemoryExit (); - unlink (FullPathMediaPriv); - free (FullPathMediaPriv); + unlink (FullPathPriv); + free (FullPathPriv); break; default: diff --git a/swad_session.c b/swad_session.c index 2df076fe..89f47f66 100644 --- a/swad_session.c +++ b/swad_session.c @@ -33,6 +33,7 @@ #include "swad_connected_database.h" #include "swad_database.h" #include "swad_error.h" +#include "swad_file_database.h" #include "swad_global.h" #include "swad_pagination.h" #include "swad_parameter.h" @@ -57,8 +58,6 @@ static void Ses_RemoveSessionFromDB (void); static bool Ses_CheckIfParamIsAlreadyInDB (const char *ParamName); -static void Brw_DB_DeletePublicDirFromCache (const char *FullPathMediaPriv); - /*****************************************************************************/ /************************** Get number of open sessions **********************/ /*****************************************************************************/ @@ -108,7 +107,7 @@ void Ses_CloseSession (void) if (Gbl.Usrs.Me.Logged) { /***** Remove links to private files from cache *****/ - Brw_DB_RemovePublicDirsCache (); + Fil_DB_RemovePublicDirsCache (); /***** Remove session from database *****/ Ses_RemoveSessionFromDB (); @@ -121,7 +120,7 @@ void Ses_CloseSession (void) /***** Remove unused data associated to expired sessions *****/ Ses_RemoveParamsFromExpiredSessions (); - Brw_DB_RemovePublicDirsFromExpiredSessions (); + Fil_DB_RemovePublicDirsFromExpiredSessions (); /***** Now, user is not logged in *****/ Gbl.Usrs.Me.Role.LoggedBeforeCloseSession = Gbl.Usrs.Me.Role.Logged; @@ -301,132 +300,3 @@ void Ses_GetParamFromDB (const char *ParamName,char *ParamValue,size_t StrSize) Gbl.Session.Id, ParamName); } - -/*****************************************************************************/ -/******** Get public directory used to link private path from cache **********/ -/*****************************************************************************/ - -bool Brw_GetPublicDirFromCache (const char *FullPathMediaPriv, - char TmpPubDir[PATH_MAX + 1]) - { - bool Cached; - bool TmpPubDirExists; - - /***** Reset temporary directory *****/ - TmpPubDir[0] = '\0'; - - if (Gbl.Session.IsOpen) - { - /***** Get temporary directory from cache *****/ - Brw_DB_GetPublicDirFromCache (FullPathMediaPriv,TmpPubDir); - Cached = (TmpPubDir[0] != '\0'); - - /***** Check if temporary public directory exists *****/ - if (Cached) - { - /* If not exists (it could be deleted if its lifetime has expired) - ==> remove from cache */ - TmpPubDirExists = Fil_CheckIfPathExists (TmpPubDir); - if (!TmpPubDirExists) - Brw_DB_DeletePublicDirFromCache (FullPathMediaPriv); - return TmpPubDirExists; - } - } - - return false; - } - -/*****************************************************************************/ -/******** Get public directory used to link private path from cache **********/ -/*****************************************************************************/ - -void Brw_DB_GetPublicDirFromCache (const char *FullPathMediaPriv, - char TmpPubDir[PATH_MAX + 1]) - { - DB_QuerySELECTString (TmpPubDir,PATH_MAX,"can not get check if file is cached", - "SELECT TmpPubDir" - " FROM brw_caches" - " WHERE SessionId='%s'" - " AND PrivPath='%s'", - Gbl.Session.Id, - FullPathMediaPriv); - } - -/*****************************************************************************/ -/********* Add public directory used to link private path to cache ***********/ -/*****************************************************************************/ - -static void Brw_DB_DeletePublicDirFromCache (const char *FullPathMediaPriv) - { - /***** Delete possible entry *****/ - if (Gbl.Session.IsOpen) - DB_QueryDELETE ("can not remove cached file", - "DELETE FROM brw_caches" - " WHERE SessionId='%s'" - " AND PrivPath='%s'", - Gbl.Session.Id,FullPathMediaPriv); - } - -/*****************************************************************************/ -/********* Add public directory used to link private path to cache ***********/ -/*****************************************************************************/ - -void Brw_AddPublicDirToCache (const char *FullPathMediaPriv, - const char TmpPubDir[PATH_MAX + 1]) - { - if (Gbl.Session.IsOpen) - { - /* Delete possible old entry */ - Brw_DB_DeletePublicDirFromCache (FullPathMediaPriv); - - /* Insert new entry */ - Brw_DB_AddPublicDirToCache (FullPathMediaPriv,TmpPubDir); - } - } - -/*****************************************************************************/ -/********* Add public directory used to link private path to cache ***********/ -/*****************************************************************************/ - -void Brw_DB_AddPublicDirToCache (const char *FullPathMediaPriv, - const char TmpPubDir[PATH_MAX + 1]) - { - /* Insert new entry */ - DB_QueryINSERT ("can not cache file", - "INSERT INTO brw_caches" - " (SessionId,PrivPath,TmpPubDir)" - " VALUES" - " ('%s','%s','%s')", - Gbl.Session.Id, - FullPathMediaPriv, - TmpPubDir); - } - -/*****************************************************************************/ -/****** Remove public directories used to link private paths from cache ******/ -/*****************************************************************************/ - -void Brw_DB_RemovePublicDirsCache (void) - { - /***** Insert into cache *****/ - if (Gbl.Session.IsOpen) - DB_QueryDELETE ("can not cache file", - "DELETE FROM brw_caches" - " WHERE SessionId='%s'", - Gbl.Session.Id); - } - -/*****************************************************************************/ -/****** Remove public directories used to link private paths from cache ******/ -/****** (from expired sessions) ******/ -/*****************************************************************************/ - -void Brw_DB_RemovePublicDirsFromExpiredSessions (void) - { - /***** Remove public directories in expired sessions *****/ - DB_QueryDELETE ("can not remove public directories in expired sessions", - "DELETE FROM brw_caches" - " WHERE SessionId NOT IN" - " (SELECT SessionId" - " FROM ses_sessions)"); - } diff --git a/swad_session.h b/swad_session.h index 442a6656..eb314b45 100644 --- a/swad_session.h +++ b/swad_session.h @@ -49,15 +49,4 @@ void Ses_RemoveParamFromThisSession (void); void Ses_RemoveParamsFromExpiredSessions (void); void Ses_GetParamFromDB (const char *ParamName,char *ParamValue,size_t StrSize); -bool Brw_GetPublicDirFromCache (const char *FullPathMediaPriv, - char TmpPubDir[PATH_MAX + 1]); -void Brw_DB_GetPublicDirFromCache (const char *FullPathMediaPriv, - char TmpPubDir[PATH_MAX + 1]); -void Brw_AddPublicDirToCache (const char *FullPathMediaPriv, - const char TmpPubDir[PATH_MAX + 1]); -void Brw_DB_AddPublicDirToCache (const char *FullPathMediaPriv, - const char TmpPubDir[PATH_MAX + 1]); -void Brw_DB_RemovePublicDirsCache (void); -void Brw_DB_RemovePublicDirsFromExpiredSessions (void); - #endif