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:
MDW
2024-02-25 22:14:39 +01:00
committed by GitHub
parent 0de5807423
commit 3d3ef247c5
4 changed files with 62 additions and 62 deletions

View File

@@ -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';
}

View File

@@ -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);

View File

@@ -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'));
}

View File

@@ -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'));
}