From fb386faf94c2a934bb965bc4fb4a409ffcca187c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 9 Aug 2022 11:05:49 +0200 Subject: [PATCH] update code for PHP8 compliance --- htdocs/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index 6715577e615..017b90a6194 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -155,12 +155,12 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php'; // Number of actions to do (late) - if (isModEnabled('agenda') && empty($conf->global->MAIN_DISABLE_BLOCK_AGENDA) && $user->rights->agenda->myactions->read) { + if (isModEnabled('agenda') && empty($conf->global->MAIN_DISABLE_BLOCK_AGENDA) && $user->hasRight('agenda', 'myactions', 'read')) { include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $board = new ActionComm($db); $dashboardlines[$board->element] = $board->load_board($user); } - + // Number of project opened if (!empty($conf->project->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_PROJECT) && $user->hasRight('projet', 'lire')) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -202,13 +202,13 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } // Number of suppliers orders a deal - if (isModEnabled('supplier_order') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->rights->fournisseur->commande->lire) { + if (isModEnabled('supplier_order') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->hasRight('fournisseur', 'commande', 'lire')) { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $board = new CommandeFournisseur($db); $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); $dashboardlines[$board->element.'_awaiting'] = $board->load_board($user, 'awaiting'); } - + // Number of contract / services enabled (delayed) if (isModEnabled('contrat') && empty($conf->global->MAIN_DISABLE_BLOCK_CONTRACT) && $user->hasRight('contrat', 'lire')) { include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; @@ -235,12 +235,12 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } // Number of supplier invoices (paid) - if (isModEnabled('supplier_invoice') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && !empty($user->rights->fournisseur->facture->lire)) { + if (isModEnabled('supplier_invoice') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && !empty($user->hasRight('fournisseur', 'facture', 'lire'))) { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $board = new FactureFournisseur($db); $dashboardlines[$board->element] = $board->load_board($user); } - + // Number of transactions to conciliate if (isModEnabled('banque') && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->hasRight('banque', 'lire') && !$user->socid) { include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';