mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Fix: Replace deprecated php aliases with actual functions (#28419)
* Fix: Handle facture modulepart depr + optimise # Fix: Handle facture modulepart depr + optimise Add a case for 'facture' to 'invoice' conversion for the 'modulepart' (issue seen when introducing DolDeprationHandler). Use elseif for optimisation. * Fix: Replace deprecated php aliases with actual functions # Fix: Replace deprecated php aliases with actual functions Replacements of join with implode. * Fix: Replace deprecated php aliases with actual functions # Fix: Replace deprecated php aliases with actual functions Replacements of join with implode. * Fix: Replace deprecated php aliases with actual functions # Fix: Replace deprecated php aliases with actual functions Replacements of join with implode.
This commit is contained in:
@@ -2660,14 +2660,14 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
||||
}
|
||||
}
|
||||
// Fix modulepart for backward compatibility
|
||||
if ($modulepart == 'users') {
|
||||
if ($modulepart == 'facture') {
|
||||
$modulepart = 'invoice';
|
||||
} elseif ($modulepart == 'users') {
|
||||
$modulepart = 'user';
|
||||
}
|
||||
if ($modulepart == 'tva') {
|
||||
} elseif ($modulepart == 'tva') {
|
||||
$modulepart = 'tax-vat';
|
||||
}
|
||||
} elseif ($modulepart == 'expedition' && strpos($original_file, 'receipt/') === 0) {
|
||||
// Fix modulepart delivery
|
||||
if ($modulepart == 'expedition' && strpos($original_file, 'receipt/') === 0) {
|
||||
$modulepart = 'delivery';
|
||||
}
|
||||
|
||||
|
||||
@@ -3689,7 +3689,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
$this->error = 'Nb of emails sent : '.$nbMailSend.', '.(!empty($errorsMsg)) ? join(', ', $errorsMsg) : $error;
|
||||
$this->error = 'Nb of emails sent : '.$nbMailSend.', '.(!empty($errorsMsg)) ? implode(', ', $errorsMsg) : $error;
|
||||
|
||||
dol_syslog(__METHOD__." end - ".$this->error, LOG_INFO);
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ if (!$sortfield) {
|
||||
$search_month = GETPOST('search_month', 'int');
|
||||
$search_year = GETPOST('search_year', 'int');
|
||||
if (GETPOSTISARRAY('search_status')) {
|
||||
$search_status = join(',', GETPOST('search_status', 'array:intcomma'));
|
||||
$search_status = implode(',', GETPOST('search_status', 'array:intcomma'));
|
||||
} else {
|
||||
$search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma'));
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ if (!$sortfield) {
|
||||
$search_month = GETPOST('search_month', 'int');
|
||||
$search_year = GETPOST('search_year', 'int');
|
||||
if (GETPOSTISARRAY('search_status')) {
|
||||
$search_status = join(',', GETPOST('search_status', 'array:intcomma'));
|
||||
$search_status = implode(',', GETPOST('search_status', 'array:intcomma'));
|
||||
} else {
|
||||
$search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user