|
@@ -2762,14 +2762,14 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|
|
if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i', $original_file)) {
|
|
|
$accessallowed = 1;
|
|
|
}
|
|
|
- $original_file = $conf->expedition->dir_output."/".(strpos('sending/', $original_file) === 0 ? '' : 'sending/').$original_file;
|
|
|
+ $original_file = $conf->expedition->dir_output."/".(strpos($original_file, 'sending/') === 0 ? '' : 'sending/').$original_file;
|
|
|
//$original_file = $conf->expedition->dir_output."/".$original_file;
|
|
|
} elseif (($modulepart == 'livraison' || $modulepart == 'delivery') && !empty($conf->expedition->dir_output)) {
|
|
|
// Delivery Note Wrapping
|
|
|
if ($fuser->rights->expedition->delivery->{$lire} || preg_match('/^specimen/i', $original_file)) {
|
|
|
$accessallowed = 1;
|
|
|
}
|
|
|
- $original_file = $conf->expedition->dir_output."/".(strpos('receipt/', $original_file) === 0 ? '' : 'receipt/').$original_file;
|
|
|
+ $original_file = $conf->expedition->dir_output."/".(strpos($original_file, 'receipt/') === 0 ? '' : 'receipt/').$original_file;
|
|
|
} elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) {
|
|
|
// Wrapping pour les actions
|
|
|
if ($fuser->rights->agenda->myactions->{$read} || preg_match('/^specimen/i', $original_file)) {
|