mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 19:41:26 +01:00
FIX Link of download main doc on vat list
This commit is contained in:
@@ -2235,7 +2235,7 @@ function dol_most_recent_file($dir, $regexfilter = '', $excludefilter = array('(
|
||||
* Security check when accessing to a document (used by document.php, viewimage.php and webservices to get documents).
|
||||
* TODO Replace code that set $accesallowed by a call to restrictedArea()
|
||||
*
|
||||
* @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'). Exemple: 'medias', 'invoice', 'logs', 'tax-vat', ...
|
||||
* @param string $original_file Relative path with filename, relative to modulepart.
|
||||
* @param string $entity Restrict onto entity (0=no restriction)
|
||||
* @param User $fuser User object (forced)
|
||||
@@ -2263,10 +2263,13 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
||||
$entity = 0;
|
||||
}
|
||||
}
|
||||
// Fix modulepart
|
||||
// Fix modulepart for backward compatibility
|
||||
if ($modulepart == 'users') {
|
||||
$modulepart = 'user';
|
||||
}
|
||||
if ($modulepart == 'tva') {
|
||||
$modulepart = 'tax-vat';
|
||||
}
|
||||
|
||||
//print 'dol_check_secure_access_document modulepart='.$modulepart.' original_file='.$original_file.' entity='.$entity;
|
||||
dol_syslog('dol_check_secure_access_document modulepart='.$modulepart.' original_file='.$original_file.' entity='.$entity);
|
||||
@@ -2436,7 +2439,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
||||
$accessallowed = 1;
|
||||
}
|
||||
$original_file = (!empty($conf->product->multidir_temp[$entity]) ? $conf->product->multidir_temp[$entity] : $conf->service->multidir_temp[$entity]).'/'.$original_file;
|
||||
} elseif (in_array($modulepart, array('tax', 'tax-vat')) && !empty($conf->tax->dir_output)) {
|
||||
} elseif (in_array($modulepart, array('tax', 'tax-vat', 'tva')) && !empty($conf->tax->dir_output)) {
|
||||
// Wrapping for taxes
|
||||
if ($fuser->rights->tax->charges->{$lire}) {
|
||||
$accessallowed = 1;
|
||||
|
||||
Reference in New Issue
Block a user