Skip to content

Commit

Permalink
Update files.lib.php
Browse files Browse the repository at this point in the history
  • Loading branch information
leninrivas authored Oct 23, 2023
1 parent f5fde47 commit e64b237
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/core/lib/files.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2526,10 +2526,10 @@ function dol_most_recent_file($dir, $regexfilter = '', $excludefilter = array('(
global $conf;
$tmparray = dol_dir_list($dir, 'files', 0, $regexfilter, $excludefilter, 'date', SORT_DESC, $mode, $nohook);
//return isset($tmparray[0])?$tmparray[0]:null;
if(!empty($conf->global->MAIN_EMAIL_ATTACH_ALL_FILES)) {
return isset($tmparray)?$tmparray:null;
if (!empty($conf->global->MAIN_EMAIL_ATTACH_ALL_FILES)) {
return isset($tmparray)?$tmparray:null;
} else {
return isset($tmparray[0])?$tmparray[0]:null;
return isset($tmparray[0])?$tmparray[0]:null;
}
}

Expand Down

0 comments on commit e64b237

Please sign in to comment.