2
0
forked from Wavyzz/dolibarr

Work on generic usage of get_exdir.

This commit is contained in:
Laurent Destailleur
2015-05-18 23:04:49 +02:00
parent 15c355efc9
commit 4a70bb7acf
9 changed files with 40 additions and 29 deletions

View File

@@ -1399,7 +1399,7 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta
/**
* Security check when accessing to a document (used by document.php, viewimage.php and webservices)
*
* @param string $modulepart Module of document (module, module_user_temp, module_user or module_temp)
* @param string $modulepart Module of document ('module', 'module_user_temp', 'module_user' or 'module_temp')
* @param string $original_file Relative path with filename
* @param string $entity Restrict onto entity
* @param User $fuser User object (forced)
@@ -1817,7 +1817,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
$accessallowed=1;
}
$original_file=$conf->banque->dir_output.'/bordereau/'.get_exdir(basename($original_file,".pdf"),2,1,0,null,'cheque').$original_file;
$original_file=$conf->banque->dir_output.'/bordereau/'.$original_file; // original_file should contains relative path so include the get_exdir result
}
// Wrapping for export module