From 4eeaac5ee77c5a1e8d970891afe45360fbc2d211 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 19 Jul 2021 09:45:47 +0200 Subject: [PATCH 1/5] warning error on PHP 8 --- htdocs/societe/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index f5a4392a0c0..2e9e0fcb3f3 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2006 Rodolphe Quiedeville * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2014 Charles-Fr Benke + * Copyright (C) 2014-2021 Charlene Benke * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2019 Nicolas ZABOURI @@ -185,6 +185,7 @@ $thirdpartygraph .= ''; $thirdpartygraph .= ''; $thirdpartygraph .= ''; +$thirdpartycateggraph = ""; if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $elementtype = 'societe'; @@ -283,6 +284,7 @@ $sql .= $db->order("s.tms", "DESC"); $sql .= $db->plimit($max, 0); //print $sql; +$lastmodified=""; $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); From 1a23cfc6f982d8f39e1bb58c1bcbbd90bc5172eb Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 19 Jul 2021 10:01:11 +0200 Subject: [PATCH 2/5] Update list.php --- htdocs/compta/bank/list.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index c1b446a9dd0..657b1cb8577 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -67,6 +67,8 @@ $socid = 0; if ($user->socid) { $socid = $user->socid; } + +$allowed = 0; if (!empty($user->rights->accounting->chartofaccount)) { $allowed = 1; // Dictionary with list of banks accounting account allowed to manager of chart account } @@ -191,7 +193,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."bank_account as b"; -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)"; } @@ -333,12 +335,12 @@ $objecttmp = new Account($db); $trackid = 'bank'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) { - foreach ($fieldstosearchall as $key => $val) { - $fieldstosearchall[$key] = $langs->trans($val); - } - print '
'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
'; -} +//if ($sall) { +// foreach ($fieldstosearchall as $key => $val) { +// $fieldstosearchall[$key] = $langs->trans($val); +// } +// print '
'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
'; +//} $moreforfilter = ''; From 29bdbe02f284c3fa80a1f82fde026ed0e53111cd Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 19 Jul 2021 10:21:18 +0200 Subject: [PATCH 3/5] Update index.php --- htdocs/comm/action/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index c87af9558e8..9fac243ac86 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -525,6 +525,7 @@ $viewmode .= ''; // To add a space before t $newcardbutton = ''; +$newparam = ''; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { $tmpforcreatebutton = dol_getdate(dol_now(), true); From 49a74c2b3b23845107bd6388dd5e46d42be97ade Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 19 Jul 2021 10:42:11 +0200 Subject: [PATCH 4/5] Update index.php --- htdocs/ticket/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/ticket/index.php b/htdocs/ticket/index.php index c3027e5044b..756f8e10879 100644 --- a/htdocs/ticket/index.php +++ b/htdocs/ticket/index.php @@ -50,6 +50,7 @@ $socid = 0; if ($user->socid) { $socid = $user->socid; } +$userid = $user->id; // Security check $result = restrictedArea($user, 'ticket', 0, '', '', '', ''); @@ -96,7 +97,7 @@ if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) { $endyear = GETPOST($param_year, 'int'); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); -} else { +} elseif (!empty($_COOKIE['DOLUSERCOOKIE_ticket_by_status'])) { $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_ticket_by_status'], true); $endyear = $tmparray['year']; $shownb = $tmparray['shownb']; @@ -104,6 +105,7 @@ if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) { } if (empty($shownb) && empty($showtot)) { $showtot = 1; + $shownb = 0; } $nowarray = dol_getdate(dol_now(), true); From 09954a304767bc8b23f240bd8d7e3b120585cb35 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 19 Jul 2021 11:01:06 +0200 Subject: [PATCH 5/5] Update html.formcompany.class.php --- htdocs/core/class/html.formcompany.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index bb99b2a32e9..57bedd2807a 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -1077,7 +1077,7 @@ class FormCompany extends Form $out .= ''; $out .= ''; } else { - if ($selected) { + if ($selected > 0) { $arr = $this->typent_array(0); $typent = $arr[$selected]; $out .= $typent;