From e2d03a9dba844c6e6fb3582152eb81bee22c38b5 Mon Sep 17 00:00:00 2001 From: jfefe <jfefe@aternatik.fr> Date: Thu, 14 Feb 2013 13:15:23 +0100 Subject: [PATCH] Add possibility to disable hook on list of recent 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 c257b00e56d..5497bb9a13c 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1239,11 +1239,12 @@ function dol_uncompress($inputfile,$outputdir) * @param string $dir Directory to scan * @param string $regexfilter Regexfilter * @param string $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.')) - * @return strnig Full path to most recent file + * @param int $nohook Disable all hooks + * @return string Full path to most recent file */ -function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('\.meta$','^\.')) +function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('\.meta$','^\.'),$nohook=false) { - $tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC); + $tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,'',$nohook); return $tmparray[0]; } ?> -- GitLab