From bf9b797e07e7e1ce4d34c16698986ae8b437b33e Mon Sep 17 00:00:00 2001 From: Joachim Kueter Date: Sat, 20 Jul 2024 17:44:49 +0200 Subject: [PATCH 01/17] Fix regression of #30398 (#30425) * Fix regression of #30398 If no BIC is provided, only the BIC line must be omitted, not the surrounding block, even if it is empty. * fix whitespace --- htdocs/compta/prelevement/class/bonprelevement.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 9f60156c6a8..e8770f12f0e 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -2211,13 +2211,13 @@ class BonPrelevement extends CommonObject $XML_DEBITOR .= ' false' . $CrLf; $XML_DEBITOR .= ' ' . $CrLf; $XML_DEBITOR .= ' ' . $CrLf; + $XML_DEBITOR .= ' ' . $CrLf; + $XML_DEBITOR .= ' ' . $CrLf; if (getDolGlobalInt('WITHDRAWAL_WITHOUT_BIC')==0) { - $XML_DEBITOR .= ' ' . $CrLf; - $XML_DEBITOR .= ' ' . $CrLf; $XML_DEBITOR .= ' ' . $row_bic . '' . $CrLf; - $XML_DEBITOR .= ' ' . $CrLf; - $XML_DEBITOR .= ' ' . $CrLf; } + $XML_DEBITOR .= ' ' . $CrLf; + $XML_DEBITOR .= ' ' . $CrLf; $XML_DEBITOR .= ' ' . $CrLf; $XML_DEBITOR .= ' ' . dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ' '))) . '' . $CrLf; $XML_DEBITOR .= ' ' . $CrLf; From d4a67c00bddfeb3388623df68a58ea22b6e942b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2024 17:52:49 +0200 Subject: [PATCH 02/17] Fix phan --- htdocs/core/boxes/box_factures_imp.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index 4c7473046d5..f5ac8185349 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -139,10 +139,9 @@ class box_factures_imp extends ModeleBoxes while ($line < min($num, $this->max)) { $objp = $this->db->fetch_object($result); - $datelimite = $this->db->jdate($objp->datelimite); $date = $this->db->jdate($objp->date); $datem = $this->db->jdate($objp->tms); - $datelimit = $this->db->jdate(datelimite); + $datelimit = $this->db->jdate($obj->datelimite); $facturestatic->id = $objp->facid; $facturestatic->ref = $objp->ref; @@ -182,7 +181,7 @@ class box_factures_imp extends ModeleBoxes $late = ''; if ($facturestatic->hasDelay()) { // @phan-suppress-next-line PhanPluginPrintfVariableFormatString - $late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day', 'tzuserrel'))); + $late = img_warning(sprintf($l_due_date, dol_print_date($datelimit, 'day', 'tzuserrel'))); } $this->info_box_contents[$line][] = array( @@ -204,8 +203,8 @@ class box_factures_imp extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateDue").': '.dol_print_date($datelimite, 'day', 'tzuserrel')).'"', - 'text' => dol_print_date($datelimite, 'day', 'tzuserrel'), + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateDue").': '.dol_print_date($datelimit, 'day', 'tzuserrel')).'"', + 'text' => dol_print_date($datelimit, 'day', 'tzuserrel'), ); $this->info_box_contents[$line][] = array( From 61d6196d24ff567d56fbe2d4b3db6c54233ccd0d Mon Sep 17 00:00:00 2001 From: atm-lena <52402938+atm-lena@users.noreply.github.com> Date: Sat, 20 Jul 2024 18:24:30 +0200 Subject: [PATCH 03/17] NEW llxHeader Zapier (#30420) Co-authored-by: atm-lena --- htdocs/zapier/admin/about.php | 2 +- htdocs/zapier/admin/setup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/zapier/admin/about.php b/htdocs/zapier/admin/about.php index 9b143c7acdb..88fae5a0a12 100644 --- a/htdocs/zapier/admin/about.php +++ b/htdocs/zapier/admin/about.php @@ -71,7 +71,7 @@ $form = new Form($db); $page_name = "ZapierForDolibarrSetup"; $help_url = 'EN:Module_Zapier'; -llxHeader('', $langs->trans($page_name), $help_url); +llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-zapier page-admin_about'); // Subheader $linkback = ''.$langs->trans("BackToModuleList").''; diff --git a/htdocs/zapier/admin/setup.php b/htdocs/zapier/admin/setup.php index 6ae23e3dc21..9e5ce8ab950 100644 --- a/htdocs/zapier/admin/setup.php +++ b/htdocs/zapier/admin/setup.php @@ -66,7 +66,7 @@ include DOL_DOCUMENT_ROOT . '/core/actions_setmoduleoptions.inc.php'; $page_name = 'ZapierForDolibarrSetup'; $help_url = 'EN:Module_Zapier'; -llxHeader('', $langs->trans($page_name), $help_url); +llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-zapier page-admin_setup'); // Subheader $linkback = '' . $langs->trans("BackToModuleList") . ''; From 3d5600e534658940fd7adf243bfcec9c2d8fc296 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2024 18:41:29 +0200 Subject: [PATCH 04/17] Fix phan --- htdocs/core/boxes/box_factures_imp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index f5ac8185349..86e9b986a31 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -141,7 +141,7 @@ class box_factures_imp extends ModeleBoxes $date = $this->db->jdate($objp->date); $datem = $this->db->jdate($objp->tms); - $datelimit = $this->db->jdate($obj->datelimite); + $datelimit = $this->db->jdate($objp->datelimite); $facturestatic->id = $objp->facid; $facturestatic->ref = $objp->ref; From c5e10bc3540970d2e7ef6fd4093d0ff962e74aaa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2024 19:08:48 +0200 Subject: [PATCH 05/17] Fix error sqlfuff on large mysqldump. --- .pre-commit-config.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e7edb002653..eaf5398f9f1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -241,16 +241,15 @@ repos: - id: sqlfluff-lint stages: [pre-commit, manual] # manual needed for ci exclude: (?x)^ - (htdocs/includes/.* - |htdocs/install/doctemplates/websites/.*_template + (dev/inidemo/mysqldump_.*\.sql |htdocs/core/menus/init_menu_auguria\.sql + |htdocs/includes/.* + |htdocs/install/doctemplates/websites/.*_template |htdocs/install/doctemplates/websites/website_template-.*\.sql - |(htdocs/install/mysql/data/(llx_20_c_departements\.sql - |llx_accounting_account_.*\.sql) - |(htdocs/install/mysql/migration/3\.[256]\.0-.*\.sql) - ) + |htdocs/install/mysql/data/llx_20_c_departements\.sql + |htdocs/install/mysql/data/llx_accounting_account_.*\.sql + |htdocs/install/mysql/migration/3\..*\.sql |htdocs/install/mysql/migration/(1[0-5]|[456789])\.0\.0-.*\.sql - |htdocs/install/mysql/migration/3\.([0134789])\.0-.*\.sql |htdocs/install/mysql/migration/repair\.sql |htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal\.sql |htdocs/install/mysql/tables/llx_categorie(_(account|actioncomm|contact|fournisseur|knowledgemanagement-knowledgemanagement|member|product|project|societe|ticket-ticket|user|warehouse|website_page-website)?\.key\.sql) From e1175158c3544cb2097bf49d099c2264dd5f70e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Jul 2024 00:12:30 +0200 Subject: [PATCH 06/17] Fix exclude --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eaf5398f9f1..b0e82ed5121 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -241,7 +241,7 @@ repos: - id: sqlfluff-lint stages: [pre-commit, manual] # manual needed for ci exclude: (?x)^ - (dev/inidemo/mysqldump_.*\.sql + (dev/initdemo/mysqldump_.*\.sql |htdocs/core/menus/init_menu_auguria\.sql |htdocs/includes/.* |htdocs/install/doctemplates/websites/.*_template From ddaadfdd43c0969fb2c6d92cdb2b6536ab835409 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Jul 2024 00:38:45 +0200 Subject: [PATCH 07/17] Update doc --- dev/setup/pre-commit/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/setup/pre-commit/README.md b/dev/setup/pre-commit/README.md index c2a1e4901cb..e610a55c411 100644 --- a/dev/setup/pre-commit/README.md +++ b/dev/setup/pre-commit/README.md @@ -25,7 +25,10 @@ the project: `pre-commit-config.yaml`. 1. Install pre-commit tool.\ If you do not have python installed, install [python](https://www.python.org) first.\ + `sudo apt install python3` + If you do not have [`pip`](https://pypi.org/project/pip), install that as well.\\ + `sudo apt install pip` Then you can install pre-commit tool: `python3 -m pip install pre-commit` From 1d3a7a353ed9f377e4d76f7f0f2c6989be7b83df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Jul 2024 01:07:40 +0200 Subject: [PATCH 08/17] Update doc --- .pre-commit-config.yaml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b0e82ed5121..c2d0f5c468d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -235,6 +235,7 @@ repos: - id: shellcheck args: [-W, "100"] + # Check sql file syntax - repo: https://github.com/sqlfluff/sqlfluff rev: 3.0.4 hooks: @@ -244,15 +245,4 @@ repos: (dev/initdemo/mysqldump_.*\.sql |htdocs/core/menus/init_menu_auguria\.sql |htdocs/includes/.* - |htdocs/install/doctemplates/websites/.*_template - |htdocs/install/doctemplates/websites/website_template-.*\.sql - |htdocs/install/mysql/data/llx_20_c_departements\.sql - |htdocs/install/mysql/data/llx_accounting_account_.*\.sql - |htdocs/install/mysql/migration/3\..*\.sql - |htdocs/install/mysql/migration/(1[0-5]|[456789])\.0\.0-.*\.sql - |htdocs/install/mysql/migration/repair\.sql - |htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal\.sql - |htdocs/install/mysql/tables/llx_categorie(_(account|actioncomm|contact|fournisseur|knowledgemanagement-knowledgemanagement|member|product|project|societe|ticket-ticket|user|warehouse|website_page-website)?\.key\.sql) - |htdocs/install/mysql/tables/llx_rights_def\.key\.sql - |htdocs/install/pgsql/functions/functions(-(don|loan|mailing|opensurvey|partnership|recruitment|website))?\.sql )$ From 143edfa294f51549d84714c803df727c783feab4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Jul 2024 01:08:09 +0200 Subject: [PATCH 09/17] Update doc --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c2d0f5c468d..96f11eaf7c8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -245,4 +245,8 @@ repos: (dev/initdemo/mysqldump_.*\.sql |htdocs/core/menus/init_menu_auguria\.sql |htdocs/includes/.* + |htdocs/install/doctemplates/websites/.*_template + |htdocs/install/doctemplates/websites/website_template.*\.sql + |htdocs/install/mysql/data/llx_20_c_departements\.sql + |htdocs/install/mysql/data/llx_accounting_account_.*\.sql )$ From f29fbd277f28bd36dec5ec66de769297b9321745 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Jul 2024 01:08:45 +0200 Subject: [PATCH 10/17] Update doc --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 96f11eaf7c8..03ee814288d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -249,4 +249,8 @@ repos: |htdocs/install/doctemplates/websites/website_template.*\.sql |htdocs/install/mysql/data/llx_20_c_departements\.sql |htdocs/install/mysql/data/llx_accounting_account_.*\.sql + |htdocs/install/mysql/migration/3\..*\.sql + |htdocs/install/mysql/migration/(1[0-5]|[456789])\.0\.0-.*\.sql + |htdocs/install/mysql/migration/repair\.sql + |htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal\.sql )$ From 87065f03956abf72740b3814fb7848595368873f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Jul 2024 01:12:18 +0200 Subject: [PATCH 11/17] Update doc --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 03ee814288d..328005d7a4d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -253,4 +253,8 @@ repos: |htdocs/install/mysql/migration/(1[0-5]|[456789])\.0\.0-.*\.sql |htdocs/install/mysql/migration/repair\.sql |htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal\.sql + |htdocs/install/mysql/tables/llx_categorie.*\.key\.sql + |htdocs/install/mysql/tables/llx_rights_def\.key\.sql + |htdocs/install/pgsql/functions/functions.*\.sql + |htdocs/modulebuilder/template/sql/.*\.sql )$ From 88518a87f06db90a05f2f978f23382d0b11ea2a0 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Sun, 21 Jul 2024 01:22:37 +0200 Subject: [PATCH 12/17] New jnotify for login errors (#30277) * New jnotify for login errors * fix to be ceznter * fix top --------- Co-authored-by: Hystepik Co-authored-by: Laurent Destailleur --- htdocs/core/tpl/login.tpl.php | 36 +++++++++++++------ .../jnotify/jquery.jnotify-alt.min.css | 6 ++++ 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index ef722cdd2a3..ae656e471f9 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -400,20 +400,34 @@ if (isset($conf->file->main_authentication) && preg_match('/google/', $conf->fil -