mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 01:58:09 +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
|
// Fix modulepart for backward compatibility
|
||||||
if ($modulepart == 'users') {
|
if ($modulepart == 'facture') {
|
||||||
|
$modulepart = 'invoice';
|
||||||
|
} elseif ($modulepart == 'users') {
|
||||||
$modulepart = 'user';
|
$modulepart = 'user';
|
||||||
}
|
} elseif ($modulepart == 'tva') {
|
||||||
if ($modulepart == 'tva') {
|
|
||||||
$modulepart = 'tax-vat';
|
$modulepart = 'tax-vat';
|
||||||
}
|
} elseif ($modulepart == 'expedition' && strpos($original_file, 'receipt/') === 0) {
|
||||||
// Fix modulepart delivery
|
// Fix modulepart delivery
|
||||||
if ($modulepart == 'expedition' && strpos($original_file, 'receipt/') === 0) {
|
|
||||||
$modulepart = 'delivery';
|
$modulepart = 'delivery';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3689,7 +3689,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} 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);
|
dol_syslog(__METHOD__." end - ".$this->error, LOG_INFO);
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ if (!$sortfield) {
|
|||||||
$search_month = GETPOST('search_month', 'int');
|
$search_month = GETPOST('search_month', 'int');
|
||||||
$search_year = GETPOST('search_year', 'int');
|
$search_year = GETPOST('search_year', 'int');
|
||||||
if (GETPOSTISARRAY('search_status')) {
|
if (GETPOSTISARRAY('search_status')) {
|
||||||
$search_status = join(',', GETPOST('search_status', 'array:intcomma'));
|
$search_status = implode(',', GETPOST('search_status', 'array:intcomma'));
|
||||||
} else {
|
} else {
|
||||||
$search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma'));
|
$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_month = GETPOST('search_month', 'int');
|
||||||
$search_year = GETPOST('search_year', 'int');
|
$search_year = GETPOST('search_year', 'int');
|
||||||
if (GETPOSTISARRAY('search_status')) {
|
if (GETPOSTISARRAY('search_status')) {
|
||||||
$search_status = join(',', GETPOST('search_status', 'array:intcomma'));
|
$search_status = implode(',', GETPOST('search_status', 'array:intcomma'));
|
||||||
} else {
|
} else {
|
||||||
$search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma'));
|
$search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma'));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user