Clean code

This commit is contained in:
Laurent Destailleur 2026-03-29 16:36:23 +02:00
parent d928a9ab1e
commit 48ea593afd
4 changed files with 6 additions and 7 deletions

View file

@ -902,7 +902,7 @@ if ($contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
}
if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.urlencode($limit);
$param .= '&limit='.((int) $limit);
}
// List of mass actions available

View file

@ -170,11 +170,11 @@ if ($contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
}
if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.urlencode($limit);
$param .= '&limit='.((int) $limit);
}
foreach ($search_array as $key => $val) {
if (!empty($val) || $val === '0') {
$param .= '&' . $key . '=' . urlencode($val);
$param .= '&' . urlencode($key) . '=' . urlencode($val);
}
}

View file

@ -88,9 +88,8 @@ if ($object->fetch($id, $ref)) {
if ($user->socid) {
$socid = $user->socid;
}
if ($object !== null) {
$result = restrictedArea($user, $object->element, $object->id, 'payment', '');
}
restrictedArea($user, $object->element, $object->id, 'payment', '');
$permissiontoadd = ($user->hasRight('facture', 'creer')); // Used by the include of actions_setnotes.inc.php

View file

@ -533,7 +533,7 @@ if (empty($reshook)) {
$param .= '&contextpage='.urlencode($contextpage);
}
if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.urlencode(strval($limit));
$param .= '&limit='.((int) $limit);
}
if ($search_all) {
$param .= "&search_all=".urlencode($search_all);