From 6bb4dcd66ce303b589861318d4dc0a2bfc63cd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josep=20Llu=C3=ADs?= Date: Tue, 27 Dec 2022 16:26:47 +0100 Subject: [PATCH 1/2] Clean unused variables Clean unused variables --- htdocs/resource/agenda.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/resource/agenda.php b/htdocs/resource/agenda.php index a9378cefe1d..b5a0c099cff 100644 --- a/htdocs/resource/agenda.php +++ b/htdocs/resource/agenda.php @@ -166,7 +166,7 @@ if ($object->id > 0) { print dol_get_fiche_end(); if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { - $param = '&id='.$object->id.'&socid='.$socid; + $param = '&id='.$object->id; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } @@ -174,7 +174,7 @@ if ($object->id > 0) { $param .= '&limit='.urlencode($limit); } - print_barre_liste($langs->trans("ActionsOnResource"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 1); + print_barre_liste($langs->trans("ActionsOnResource"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', '', '', '', 0, 1, 1); // List of all actions $filters = array(); From 771bbeff5e11861173982636669fc6d5662a8531 Mon Sep 17 00:00:00 2001 From: Braito Date: Tue, 27 Dec 2022 17:01:29 +0100 Subject: [PATCH 2/2] php 8 warning --- htdocs/compta/bank/various_payment/list.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index c1d6e9f3ec4..0721aeb7ef0 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -466,7 +466,7 @@ if ($resql) { } // Accounting account - if ($arrayfields['account']['checked']) { + if (!empty($arrayfields['account']['checked'])) { print ''; print '
'; print $formaccounting->select_account($search_accountancy_account, 'search_accountancy_account', 1, array(), 1, 1, 'maxwidth200'); @@ -475,7 +475,7 @@ if ($resql) { } // Subledger account - if ($arrayfields['subledger']['checked']) { + if (!empty($arrayfields['subledger']['checked'])) { print ''; print '
'; print $formaccounting->select_auxaccount($search_accountancy_subledger, 'search_accountancy_subledger', 1, 'maxwidth200'); @@ -484,7 +484,7 @@ if ($resql) { } // Debit - if ($arrayfields['debit']['checked']) { + if (!empty($arrayfields['debit']['checked'])) { print ''; print ''; print ''; @@ -535,10 +535,10 @@ if ($resql) { if ($arrayfields['entry']['checked']) { print_liste_field_titre($arrayfields['entry']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); } - if ($arrayfields['account']['checked']) { + if (!empty($arrayfields['account']['checked'])) { print_liste_field_titre($arrayfields['account']['label'], $_SERVER["PHP_SELF"], 'v.accountancy_code', '', $param, '', $sortfield, $sortorder, 'left '); } - if ($arrayfields['subledger']['checked']) { + if (!empty($arrayfields['subledger']['checked'])) { print_liste_field_titre($arrayfields['subledger']['label'], $_SERVER["PHP_SELF"], 'v.subledger_account', '', $param, '', $sortfield, $sortorder, 'left '); } if ($arrayfields['debit']['checked']) { @@ -671,7 +671,7 @@ if ($resql) { } // Accounting account - if ($arrayfields['account']['checked']) { + if (!empty($arrayfields['account']['checked'])) { $accountingaccount->fetch('', $obj->accountancy_code, 1); print ''.$accountingaccount->getNomUrl(0, 1, 1, '', 1).''; @@ -681,7 +681,7 @@ if ($resql) { } // Accounting subledger account - if ($arrayfields['subledger']['checked']) { + if (!empty($arrayfields['subledger']['checked'])) { print ''.length_accounta($obj->subledger_account).''; if (!$i) { $totalarray['nbfield']++;