From 0bf09e0fb263715f48c4650800d197196efd53c1 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Fri, 27 May 2022 16:22:01 +0200 Subject: [PATCH] php V8 fix warning --- htdocs/blockedlog/class/blockedlog.class.php | 66 +++++++------------- 1 file changed, 22 insertions(+), 44 deletions(-) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 578e1afa497..a313d28d938 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -1,6 +1,7 @@ - * Copyright (C) 2017-2020 Laurent Destailleur +/* Copyright (C) 2017 ATM Consulting + * Copyright (C) 2017-2020 Laurent Destailleur + * Copyright (C) 2022 charlene benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -139,76 +140,53 @@ class BlockedLog $this->trackedevents = array(); - if ($conf->facture->enabled) { + if (!empty($conf->facture->enabled)) { $this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE'; - } - if ($conf->facture->enabled) { $this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE'; - } - if ($conf->facture->enabled) { $this->trackedevents['BILL_SENTBYMAIL'] = 'logBILL_SENTBYMAIL'; - } - if ($conf->facture->enabled) { $this->trackedevents['DOC_DOWNLOAD'] = 'BlockedLogBillDownload'; - } - if ($conf->facture->enabled) { $this->trackedevents['DOC_PREVIEW'] = 'BlockedLogBillPreview'; - } - if ($conf->facture->enabled) { $this->trackedevents['PAYMENT_CUSTOMER_CREATE'] = 'logPAYMENT_CUSTOMER_CREATE'; - } - if ($conf->facture->enabled) { $this->trackedevents['PAYMENT_CUSTOMER_DELETE'] = 'logPAYMENT_CUSTOMER_DELETE'; } /* Supplier - if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate'; - if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_DELETE']='BlockedLogSupplierBillDelete'; - if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_SENTBYMAIL']='BlockedLogSupplierBillSentByEmail'; // Trigger key does not exists, we want just into array to list it as done - if ($conf->fournisseur->enabled) $this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done - if ($conf->fournisseur->enabled) $this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done + if (!empty($conf->fournisseur->enabled)) { + $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate'; + $this->trackedevents['BILL_SUPPLIER_DELETE']='BlockedLogSupplierBillDelete'; + $this->trackedevents['BILL_SUPPLIER_SENTBYMAIL']='BlockedLogSupplierBillSentByEmail'; // Trigger key does not exists, we want just into array to list it as done + $this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done + $this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done - if ($conf->fournisseur->enabled) $this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate'; - if ($conf->fournisseur->enabled) $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate'; + $this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate'; + $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate'; + } */ - if ($conf->don->enabled) { + if (!empty($conf->don->enabled)) { $this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE'; - } - if ($conf->don->enabled) { $this->trackedevents['DON_DELETE'] = 'logDON_DELETE'; - } - //if ($conf->don->enabled) $this->trackedevents['DON_SENTBYMAIL']='logDON_SENTBYMAIL'; - - if ($conf->don->enabled) { + //$this->trackedevents['DON_SENTBYMAIL']='logDON_SENTBYMAIL'; $this->trackedevents['DONATION_PAYMENT_CREATE'] = 'logDONATION_PAYMENT_CREATE'; - } - if ($conf->don->enabled) { $this->trackedevents['DONATION_PAYMENT_DELETE'] = 'logDONATION_PAYMENT_DELETE'; } /* - if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate'; - if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate'; - if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate'; + if (!empty($conf->salary->enabled)) { + $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate'; + $this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate'; + $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate'; + } */ - if ($conf->adherent->enabled) { + if (!empty($conf->adherent->enabled)) { $this->trackedevents['MEMBER_SUBSCRIPTION_CREATE'] = 'logMEMBER_SUBSCRIPTION_CREATE'; - } - if ($conf->adherent->enabled) { $this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY'; - } - if ($conf->adherent->enabled) { $this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE'; } - if ($conf->banque->enabled) { + if (!empty($conf->banque->enabled)) { $this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE'; - } - if ($conf->banque->enabled) { $this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY'; - } - if ($conf->banque->enabled) { $this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE'; } // $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules