From df51c0ea519e8a22e5769ad83adbcf9621c957a3 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 15 Oct 2022 13:07:07 +0200 Subject: [PATCH 1/6] Fix php 8 error --- htdocs/datapolicy/class/datapolicycron.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index 965d93754f7..13e31581f76 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -451,8 +451,8 @@ class DataPolicyCron $this->db->begin(); foreach ($arrayofparameters as $key => $params) { - if ($conf->global->$key != '' && is_numeric($conf->global->$key) && (int) $conf->global->$key > 0) { - $sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key); + if (getDolGlobalInt($key) != '' && is_numeric(getDolGlobalInt($key)) && (int) getDolGlobalInt($key) > 0) { + $sql = sprintf($params['sql'], (int) $conf->entity, (int) getDolGlobalInt($key), (int) getDolGlobalInt($key)); $resql = $this->db->query($sql); From 1044e79aa147701201fa7bf0272df1a99bb5263c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 15 Oct 2022 13:19:55 +0200 Subject: [PATCH 2/6] fix php 8 error --- htdocs/compta/facture/class/facture-rec.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 7cfe15b64e6..e8c965f5937 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1274,6 +1274,8 @@ class FactureRec extends CommonInvoice $tmparray = dol_getdate($now); $today = dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); // Today is last second of current day + $this->output = null; + dol_syslog("createRecurringInvoices restrictioninvoiceid=".$restrictioninvoiceid." forcevalidation=".$forcevalidation); $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'facture_rec'; From 4b404909f6dbb269d545a8a72f721a06dd2289f5 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 15 Oct 2022 19:11:38 +0200 Subject: [PATCH 3/6] Fix php 8 error --- htdocs/ticket/class/api_tickets.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php index 3151f75877b..6d00317da58 100644 --- a/htdocs/ticket/class/api_tickets.class.php +++ b/htdocs/ticket/class/api_tickets.class.php @@ -241,7 +241,8 @@ class Tickets extends DolibarrApi if (!$socid && DolibarrApiAccess::$user->socid) { $socid = DolibarrApiAccess::$user->socid; } - + + $search_sale = null; // If the internal user must only see his customers, force searching by him if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) { $search_sale = DolibarrApiAccess::$user->id; From 2067e90f149d4dd77ec3d3588cbbacc3e8248686 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 15 Oct 2022 17:12:34 +0000 Subject: [PATCH 4/6] Fixing style errors. --- htdocs/ticket/class/api_tickets.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php index 6d00317da58..629eab03d77 100644 --- a/htdocs/ticket/class/api_tickets.class.php +++ b/htdocs/ticket/class/api_tickets.class.php @@ -241,7 +241,7 @@ class Tickets extends DolibarrApi if (!$socid && DolibarrApiAccess::$user->socid) { $socid = DolibarrApiAccess::$user->socid; } - + $search_sale = null; // If the internal user must only see his customers, force searching by him if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) { From 7a50d03256e4d9ec828d10e3fb50fa787038148a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 16 Oct 2022 14:45:35 +0200 Subject: [PATCH 5/6] FIX wrong perm check --- htdocs/core/boxes/box_dolibarr_state_board.php | 2 +- htdocs/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_dolibarr_state_board.php b/htdocs/core/boxes/box_dolibarr_state_board.php index 83615c17fd3..e158da13f14 100644 --- a/htdocs/core/boxes/box_dolibarr_state_board.php +++ b/htdocs/core/boxes/box_dolibarr_state_board.php @@ -124,7 +124,7 @@ class box_dolibarr_state_board extends ModeleBoxes 'contacts' => isModEnabled('societe') && $user->hasRight('societe', 'contact', 'lire'), 'products' => isModEnabled('product') && $user->hasRight('produit', 'lire'), 'services' => isModEnabled('service') && $user->hasRight('service', 'lire'), - 'proposals' => isModEnabled('propal') && $user->hasRight('propale', 'lire'), + 'proposals' => isModEnabled('propal') && $user->hasRight('propal', 'lire'), 'orders' => isModEnabled('commande') && $user->hasRight('commande', 'lire'), 'invoices' => isModEnabled('facture') && $user->hasRight('facture', 'lire'), 'donations' => isModEnabled('don') && $user->hasRight('don', 'lire'), diff --git a/htdocs/index.php b/htdocs/index.php index 903f77c0ed8..f9bedb661ac 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -176,7 +176,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } // Number of commercial customer proposals open (expired) - if (isModEnabled('propal') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight('propale', 'lire')) { + if (isModEnabled('propal') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight('propal', 'lire')) { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $board = new Propal($db); $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); From 7c615fafb914507843364ca326106924c759d498 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Oct 2022 23:14:33 +0200 Subject: [PATCH 6/6] Update datapolicycron.class.php --- htdocs/datapolicy/class/datapolicycron.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index 13e31581f76..c357fbe7d15 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -451,7 +451,7 @@ class DataPolicyCron $this->db->begin(); foreach ($arrayofparameters as $key => $params) { - if (getDolGlobalInt($key) != '' && is_numeric(getDolGlobalInt($key)) && (int) getDolGlobalInt($key) > 0) { + if (getDolGlobalInt($key) > 0) { $sql = sprintf($params['sql'], (int) $conf->entity, (int) getDolGlobalInt($key), (int) getDolGlobalInt($key)); $resql = $this->db->query($sql);