From 08a3ef5bbf5e1aa7b38a9340d183880f1e14ffa1 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Tue, 10 May 2022 12:25:38 +0200 Subject: [PATCH 01/14] NEW : method avoid being blocked when entry already exists for import in llx_categorie_product (use update keys) --- htdocs/core/modules/import/import_csv.modules.php | 14 +++++++++++++- .../core/modules/import/import_xlsx.modules.php | 15 ++++++++++++++- htdocs/core/modules/modCategorie.class.php | 1 + 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 78c8f5e104f..8a99dfe90d2 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -776,11 +776,18 @@ class ImportCsv extends ModeleImports $updatedone = false; $insertdone = false; + $is_table_category_link = false; + $fname = 'rowid'; + if(strpos($tablename, '_categorie_') !== false) { + $is_table_category_link = true; + $fname='*'; + } + if (!empty($updatekeys)) { // We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields) if (empty($lastinsertid)) { // No insert done yet for a parent table - $sqlSelect = 'SELECT rowid FROM '.$tablename; + $sqlSelect = 'SELECT '.$fname.' FROM '.$tablename; $data = array_combine($listfields, $listvalues); $where = array(); @@ -798,6 +805,7 @@ class ImportCsv extends ModeleImports $res = $this->db->fetch_object($resql); if ($resql->num_rows == 1) { $lastinsertid = $res->rowid; + if($is_table_category_link) $lastinsertid = 'linktable'; // used to apply update on tables like llx_categorie_product and avoid being blocked for all file content if at least one entry already exists $last_insert_id_array[$tablename] = $lastinsertid; } elseif ($resql->num_rows > 1) { $this->errors[$error]['lib'] = $langs->trans('MultipleRecordFoundWithTheseFilters', implode(', ', $filters)); @@ -859,6 +867,10 @@ class ImportCsv extends ModeleImports } $sqlend = ' WHERE '.$keyfield.' = '.((int) $lastinsertid); + if($is_table_category_link) { + $sqlend = ' WHERE ' . implode(' AND ', $where); + } + $sql = $sqlstart.$sqlend; // Run update request diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 38c9cd8c56a..c972dcbcb28 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -816,11 +816,19 @@ class ImportXlsx extends ModeleImports if (!empty($listfields)) { $updatedone = false; $insertdone = false; + + $is_table_category_link = false; + $fname = 'rowid'; + if(strpos($tablename, '_categorie_') !== false) { + $is_table_category_link = true; + $fname='*'; + } + if (!empty($updatekeys)) { // We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields) if (empty($lastinsertid)) { // No insert done yet for a parent table - $sqlSelect = 'SELECT rowid FROM ' . $tablename; + $sqlSelect = 'SELECT '.$fname.' FROM ' . $tablename; $data = array_combine($listfields, $listvalues); $where = array(); @@ -838,6 +846,7 @@ class ImportXlsx extends ModeleImports $res = $this->db->fetch_object($resql); if ($resql->num_rows == 1) { $lastinsertid = $res->rowid; + if($is_table_category_link) $lastinsertid = 'linktable'; // used to apply update on tables like llx_categorie_product and avoid being blocked for all file content if at least one entry already exists $last_insert_id_array[$tablename] = $lastinsertid; } elseif ($resql->num_rows > 1) { $this->errors[$error]['lib'] = $langs->trans('MultipleRecordFoundWithTheseFilters', implode(', ', $filters)); @@ -899,6 +908,10 @@ class ImportXlsx extends ModeleImports } $sqlend = ' WHERE ' . $keyfield . ' = '.((int) $lastinsertid); + if($is_table_category_link) { + $sqlend = ' WHERE ' . implode(' AND ', $where); + } + $sql = $sqlstart . $sqlend; // Run update request diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 776c5c76681..ab48a702250 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -481,6 +481,7 @@ class modCategorie extends DolibarrModules 'cp.fk_product'=>array('rule'=>'fetchidfromref', 'classfile'=>'/product/class/product.class.php', 'class'=>'Product', 'method'=>'fetch', 'element'=>'Product') ); $this->import_examplevalues_array[$r] = array('cp.fk_categorie'=>"rowid or label", 'cp.fk_product'=>"rowid or ref"); + $this->import_updatekeys_array[$r] = array('cp.fk_categorie' => 'Category', 'cp.fk_product' => 'ProductRef'); } // 1 Suppliers From 98f5edbfba15678d1b59d41a7c8f798f358ca400 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 10 May 2022 10:47:18 +0000 Subject: [PATCH 02/14] Fixing style errors. --- htdocs/core/modules/import/import_csv.modules.php | 6 +++--- htdocs/core/modules/import/import_xlsx.modules.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 58ff558b54b..2032730112e 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -787,7 +787,7 @@ class ImportCsv extends ModeleImports $is_table_category_link = false; $fname = 'rowid'; - if(strpos($tablename, '_categorie_') !== false) { + if (strpos($tablename, '_categorie_') !== false) { $is_table_category_link = true; $fname='*'; } @@ -814,7 +814,7 @@ class ImportCsv extends ModeleImports $res = $this->db->fetch_object($resql); if ($resql->num_rows == 1) { $lastinsertid = $res->rowid; - if($is_table_category_link) $lastinsertid = 'linktable'; // used to apply update on tables like llx_categorie_product and avoid being blocked for all file content if at least one entry already exists + if ($is_table_category_link) $lastinsertid = 'linktable'; // used to apply update on tables like llx_categorie_product and avoid being blocked for all file content if at least one entry already exists $last_insert_id_array[$tablename] = $lastinsertid; } elseif ($resql->num_rows > 1) { $this->errors[$error]['lib'] = $langs->trans('MultipleRecordFoundWithTheseFilters', implode(', ', $filters)); @@ -876,7 +876,7 @@ class ImportCsv extends ModeleImports } $sqlend = " WHERE ".$keyfield." = ".((int) $lastinsertid); - if($is_table_category_link) { + if ($is_table_category_link) { $sqlend = " WHERE " . implode(' AND ', $where); } diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 564156e8cc1..9433d864d50 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -828,7 +828,7 @@ class ImportXlsx extends ModeleImports $is_table_category_link = false; $fname = 'rowid'; - if(strpos($tablename, '_categorie_') !== false) { + if (strpos($tablename, '_categorie_') !== false) { $is_table_category_link = true; $fname='*'; } @@ -855,7 +855,7 @@ class ImportXlsx extends ModeleImports $res = $this->db->fetch_object($resql); if ($resql->num_rows == 1) { $lastinsertid = $res->rowid; - if($is_table_category_link) $lastinsertid = 'linktable'; // used to apply update on tables like llx_categorie_product and avoid being blocked for all file content if at least one entry already exists + if ($is_table_category_link) $lastinsertid = 'linktable'; // used to apply update on tables like llx_categorie_product and avoid being blocked for all file content if at least one entry already exists $last_insert_id_array[$tablename] = $lastinsertid; } elseif ($resql->num_rows > 1) { $this->errors[$error]['lib'] = $langs->trans('MultipleRecordFoundWithTheseFilters', implode(', ', $filters)); @@ -917,7 +917,7 @@ class ImportXlsx extends ModeleImports } $sqlend = " WHERE " . $keyfield . " = ".((int) $lastinsertid); - if($is_table_category_link) { + if ($is_table_category_link) { $sqlend = " WHERE " . implode(' AND ', $where); } From 9c5ee2d0b92bc09bc082638047562675b65ce9f8 Mon Sep 17 00:00:00 2001 From: Neal Joos Date: Wed, 25 May 2022 22:50:16 +0200 Subject: [PATCH 03/14] fix broken links fixed DoliWamp and DoliDeb links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5559613eaa2..9250259aa20 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions: -- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_DoliWamp) -- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian) +- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php?title=Dolibarr_for_Windows_(DoliWamp)) +- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php?title=Dolibarr_for_Ubuntu_or_Debian) - DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia Releases can be downloaded from [official website](https://www.dolibarr.org/). From 8f736b3ecb1aaa30d8ca90a981b323d9b343c68b Mon Sep 17 00:00:00 2001 From: DATUC Date: Thu, 26 May 2022 12:57:27 +0100 Subject: [PATCH 04/14] Local CM adjust Local ref update --- htdocs/langs/en_US/companies.lang | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 8f44b999a3a..c4a964b6b62 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -163,14 +163,14 @@ ProfId5CL=- ProfId6CL=- ProfId1CM=Id. prof. 1 (Trade Register) ProfId2CM=Id. prof. 2 (Taxpayer No.) -ProfId3CM=Id. prof. 3 (Decree of creation) -ProfId4CM=Id. prof. 4 (Certificate of deposits) +ProfId3CM=Id. prof. 3 (No. of creation decree) +ProfId4CM=Id. prof. 4 (Deposit certificate No.) ProfId5CM=Id. prof. 5 (Others) ProfId6CM=- ProfId1ShortCM=Trade Register ProfId2ShortCM=Taxpayer No. -ProfId3ShortCM=Decree of creation -ProfId4ShortCM=Certificate of deposits +ProfId3ShortCM=No. of creation decree +ProfId4ShortCM=Deposit certificate No. ProfId5ShortCM=Others ProfId6ShortCM=- ProfId1CO=Prof Id 1 (R.U.T.) From d14faf86a028b4a93aabd6d81a640d9cb6252534 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Fri, 27 May 2022 16:14:36 +0200 Subject: [PATCH 05/14] php V8 warning fix --- htdocs/accountancy/admin/defaultaccounts.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 6d7d92ce22b..583b12368dc 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -81,22 +81,22 @@ $list_account[] = '---Others---'; $list_account[] = 'ACCOUNTING_VAT_BUY_ACCOUNT'; $list_account[] = 'ACCOUNTING_VAT_SOLD_ACCOUNT'; $list_account[] = 'ACCOUNTING_VAT_PAY_ACCOUNT'; -if ($conf->banque->enabled) { +if (!empty($conf->banque->enabled)) { $list_account[] = 'ACCOUNTING_ACCOUNT_TRANSFER_CASH'; } -if ($conf->don->enabled) { +if (!empty($conf->don->enabled)) { $list_account[] = 'DONATION_ACCOUNTINGACCOUNT'; } -if ($conf->adherent->enabled) { +if (!empty($conf->adherent->enabled)) { $list_account[] = 'ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT'; } -if ($conf->loan->enabled) { +if (!empty($conf->loan->enabled)) { $list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_CAPITAL'; $list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INTEREST'; $list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'; } $list_account[] = 'ACCOUNTING_ACCOUNT_SUSPENSE'; -if ($conf->societe->enabled) { +if (!empty($conf->societe->enabled)) { $list_account[] = '---Deposits---'; $list_account[] = 'ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT'; } @@ -246,7 +246,7 @@ foreach ($list_account as $key) { } } -if ($conf->societe->enabled) { +if (!empty($conf->societe->enabled)) { print ''; print '' . img_picto('', 'bill', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnCustomerDeposit") . ''; if (!empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT)) { From ebfc5666988b76da0087fbc7d8d795cf37c2f490 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Fri, 27 May 2022 16:16:41 +0200 Subject: [PATCH 06/14] php V8 warning --- htdocs/admin/supplier_proposal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 9bd684afb22..80f2c6a62f4 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -498,7 +498,7 @@ print '\n"; print ''; -if ($conf->banque->enabled) { +if (!empty($conf->banque->enabled)) { print ''; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '; if (!empty($conf->use_javascript_ajax)) { 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 07/14] 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 From d36175c523d62102999c750032629b7b05c7325b Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Fri, 27 May 2022 16:23:57 +0200 Subject: [PATCH 08/14] php V8 warning --- htdocs/core/menus/standard/auguria.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 556ee3e609a..ea6d21fe457 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -339,7 +339,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $newmenu = $menuArbo->menuLeftCharger($newmenu, $mainmenu, $leftmenu, ($user->socid ? 1 : 0), 'auguria', $tabMenu); // We update newmenu for special dynamic menus - if ($conf->banque->enabled && $user->rights->banque->lire && $mainmenu == 'bank') { // Entry for each bank account + if (!empty($conf->banque->enabled) && $user->rights->banque->lire && $mainmenu == 'bank') { // Entry for each bank account include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Required for to get Account::TYPE_CASH for example $sql = "SELECT rowid, label, courant, rappro, courant"; From c257d77dc30e4652c819d4486dfadfd93ce89b28 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Sat, 28 May 2022 09:47:21 +0200 Subject: [PATCH 09/14] php V8 warning --- htdocs/adherents/admin/member.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php index ed2453ef793..bae229bc77b 100644 --- a/htdocs/adherents/admin/member.php +++ b/htdocs/adherents/admin/member.php @@ -108,7 +108,7 @@ if ($action == 'set_default') { $res3 = dolibarr_set_const($db, 'ADHERENT_CREATE_EXTERNAL_USER_LOGIN', GETPOST('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', 'alpha'), 'chaine', 0, '', $conf->entity); $res4 = dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity); // Use vat for invoice creation - if ($conf->facture->enabled) { + if (!empty($conf->facture->enabled)) { $res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity); $res5 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity); if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { @@ -256,7 +256,7 @@ print ''; print "\n"; // Use vat for invoice creation -if ($conf->facture->enabled) { +if (!empty($conf->facture->enabled)) { print ''.$langs->trans("VATToUseForSubscriptions").''; if (!empty($conf->banque->enabled)) { print ''; From 0b3e32a2236f05f34c8dfa7fd6fe4a825a126f9b Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Sat, 28 May 2022 09:52:03 +0200 Subject: [PATCH 10/14] fix php v8 warning --- htdocs/contact/consumption.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index dc4b56b2763..b7fc682d2c6 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -153,16 +153,16 @@ print ''; if ($object->thirdparty->client) { $thirdTypeArray['customer'] = $langs->trans("customer"); - if ($conf->propal->enabled && $user->rights->propal->lire) { + if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); } - if ($conf->commande->enabled && $user->rights->commande->lire) { + if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); } - if ($conf->facture->enabled && $user->rights->facture->lire) { + if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); } - if ($conf->contrat->enabled && $user->rights->contrat->lire) { + if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); } } From 4c96921a5f38c8f31756cdf7e224ccd9fb07fe68 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Sat, 28 May 2022 09:54:59 +0200 Subject: [PATCH 11/14] php 8 fix warning --- htdocs/core/class/html.formticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 5600f51f5e2..31a48f38cf4 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -346,7 +346,7 @@ class FormTicket } } - if ($conf->knowledgemanagement->enabled) { + if (!empty($conf->knowledgemanagement->enabled)) { // KM Articles print ''; print ' From b1c4aa07f09fb5cbb2de8c47c1542aada89ef77a Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Sat, 28 May 2022 09:58:54 +0200 Subject: [PATCH 12/14] fix php 8 warning --- htdocs/admin/stock.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index e8f59727c07..a5e83155f03 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -394,7 +394,7 @@ print "\n"; print "\n"; // Option to force stock to be enough before adding a line into document -if ($conf->invoice->enabled) { +if (!empty($conf->invoice->enabled)) { print ''; print ''.$langs->trans("StockMustBeEnoughForInvoice").''; print ''; @@ -408,7 +408,7 @@ if ($conf->invoice->enabled) { print "\n"; } -if ($conf->order->enabled) { +if (!empty($conf->order->enabled)) { print ''; print ''.$langs->trans("StockMustBeEnoughForOrder").''; print ''; @@ -422,7 +422,7 @@ if ($conf->order->enabled) { print "\n"; } -if ($conf->expedition->enabled) { +if (!empty($conf->expedition->enabled)) { print ''; print ''.$langs->trans("StockMustBeEnoughForShipment").''; print ''; From eba9f695c20538aa179fb3d376a99c00c92f7cb6 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Sat, 28 May 2022 10:02:02 +0200 Subject: [PATCH 13/14] fix php 8 warning --- htdocs/admin/emailcollector_card.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index d01b160ca31..50e3faa7d51 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -1,5 +1,6 @@ + * 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 @@ -592,15 +593,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea 'recordjoinpiece'=>'AttachJoinedDocumentsToObject', 'recordevent'=>'RecordEvent'); $arrayoftypesnocondition = $arrayoftypes; - if ($conf->projet->enabled) { + if (!empty($conf->projet->enabled)) { $arrayoftypes['project'] = 'CreateLeadAndThirdParty'; } $arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty'; - if ($conf->ticket->enabled) { + if (!empty($conf->ticket->enabled)) { $arrayoftypes['ticket'] = 'CreateTicketAndThirdParty'; } $arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty'; - if ($conf->recruitment->enabled) { + if (!empty($conf->recruitment->enabled)) { $arrayoftypes['candidature'] = 'CreateCandidature'; } $arrayoftypesnocondition['candidature'] = 'CreateCandidature'; From 6a9c07de9f3bc1832601f102152c603921ce3807 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 May 2022 11:15:38 +0200 Subject: [PATCH 14/14] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9250259aa20..c476f14a8cc 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions: -- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php?title=Dolibarr_for_Windows_(DoliWamp)) -- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php?title=Dolibarr_for_Ubuntu_or_Debian) +- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp)) +- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian) - DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia Releases can be downloaded from [official website](https://www.dolibarr.org/).