mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
This commit is contained in:
@@ -1361,11 +1361,12 @@ function dol_uncompress($inputfile,$outputdir)
|
||||
* @param string $regexfilter Regex filter to restrict list. This regex value must be escaped for '/', since this char is used for preg_match function
|
||||
* @param array $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview\.png)$','^\.')). This regex value must be escaped for '/', since this char is used for preg_match function
|
||||
* @param int $nohook Disable all hooks
|
||||
* @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only
|
||||
* @return string Full path to most recent file
|
||||
*/
|
||||
function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta|_preview\.png)$','^\.'),$nohook=false)
|
||||
function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta|_preview\.png)$','^\.'),$nohook=false,$mode='')
|
||||
{
|
||||
$tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,'',$nohook);
|
||||
$tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,$mode,$nohook);
|
||||
return $tmparray[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user