From 54be534506682f3353f8720a4c2ca31e3022b2ee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 11 Sep 2012 20:06:37 +0200 Subject: [PATCH] Add comment and renamed file to be sure new function is not called directly. Not sure it's a good idea to have dolDeleteFile separated since it must be called only by dol_delete_file. --- htdocs/core/lib/files.lib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 89846ffc248..7a6d6853867 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -796,12 +796,13 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0,$objec } else { - return dolDeleteFile($file, $disableglob, $nophperrors, $notrigger, $object); + return _dolDeleteFile($file, $disableglob, $nophperrors, $notrigger, $object); } } /** - * Remove a file or several files with a mask + * Remove a file or several files with a mask. + * Never call this function ! Call dol_delete_file file instead. * * @param string $file File to delete or mask of file to delete * @param int $disableglob Disable usage of glob like * @@ -811,7 +812,7 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0,$objec * @return boolean True if file is deleted, False if error * @see dol_delete_file */ -function dolDeleteFile($file,$disableglob=0,$nophperrors=0,$notrigger=0,$object=null) +function _dolDeleteFile($file,$disableglob=0,$nophperrors=0,$notrigger=0,$object=null) { global $db, $conf, $user, $langs;