From 9b6e0bab0004070575e4c653df295581cc51afad Mon Sep 17 00:00:00 2001 From: "yann.droniou" Date: Tue, 21 Feb 2023 14:26:29 +0100 Subject: [PATCH 001/151] Fix LDAP Authentification failure with error 500 --- htdocs/core/class/ldap.class.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index b2b5e2c6e93..38220f7a17b 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -344,12 +344,7 @@ class Ldap */ public function close() { - $r_type = get_resource_type($this->connection); - if ($this->connection && ($r_type === "Unknown" || !@ldap_close($this->connection))) { - return false; - } else { - return true; - } + return $this->unbind(); } /** @@ -401,7 +396,7 @@ class Ldap public function unbind() { $this->result = true; - if ($this->connection) { + if (is_resource($this->connection)) { $this->result = @ldap_unbind($this->connection); } if ($this->result) { From 67d9934aa1e63dff6a21dcf0054cd10fc664ae28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 24 Feb 2023 10:54:23 +0100 Subject: [PATCH 002/151] pagination works with any font --- htdocs/core/lib/pdf.lib.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index e4f6b169e93..d6b8365c730 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -13,6 +13,7 @@ * Copyright (C) 2019 Lenin Rivas * Copyright (C) 2020 Nicolas ZABOURI * Copyright (C) 2021-2022 Anthony Berton + * Copyright (C) 2023 Frédéric France * * 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 @@ -1287,11 +1288,14 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ } } // Show page nb only on iso languages (so default Helvetica font) - if (strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') { + // if (strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') { $pdf->SetXY($dims['wk'] - $dims['rm'] - 18, -$posy); - //$pdf->MultiCell(18, 2, $pdf->getPageNumGroupAlias().' / '.$pdf->getPageGroupAlias(), 0, 'R', 0); - $pdf->MultiCell(18, 2, $pdf->PageNo().' / '.$pdf->getAliasNbPages(), 0, 'R', 0); - } + // $pdf->MultiCell(18, 2, $pdf->getPageNumGroupAlias().' / '.$pdf->getPageGroupAlias(), 0, 'R', 0); + // $pdf->MultiCell(18, 2, $pdf->PageNo().' / '.$pdf->getAliasNbPages(), 0, 'R', 0); // doesn't works with all fonts + // $pagination = $pdf->getAliasNumPage().' / '.$pdf->getAliasNbPages(); // works with $pdf->Cell + $pagination = $pdf->PageNo().' / '.$pdf->getNumPages(); + $pdf->MultiCell(18, 2, $pagination, 0, 'R', 0); + // } // Show Draft Watermark if (!empty($watermark)) { From f140036f37389341da450d7a1c84e2a43cd543dd Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Fri, 24 Feb 2023 15:59:43 +0100 Subject: [PATCH 003/151] FIX shipping list for external user --- htdocs/expedition/list.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 9b55ff46c14..4c6a764997b 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -71,7 +71,6 @@ $search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_e $search_datereceipt_start = dol_mktime(0, 0, 0, GETPOST('search_datereceipt_startmonth', 'int'), GETPOST('search_datereceipt_startday', 'int'), GETPOST('search_datereceipt_startyear', 'int')); $search_datereceipt_end = dol_mktime(23, 59, 59, GETPOST('search_datereceipt_endmonth', 'int'), GETPOST('search_datereceipt_endday', 'int'), GETPOST('search_datereceipt_endyear', 'int')); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); -$socid = GETPOST('socid', 'int'); $search_user = GETPOST('search_user', 'int'); $search_sale = GETPOST('search_sale', 'int'); $search_categ_cus = GETPOST("search_categ_cus", 'int'); From 3c58b1cfc75a4e44ca37630186d66922ab749285 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Fri, 24 Feb 2023 16:28:15 +0100 Subject: [PATCH 004/151] add comment for Travis to play it again sam --- htdocs/expedition/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 4c6a764997b..3b653aaf17b 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -5,6 +5,7 @@ * Copyright (C) 2016-2021 Ferran Marcet * Copyright (C) 2019 Nicolas ZABOURI * Copyright (C) 2020 Thibault FOUCART + * Copyright (C) 2023 Christophe Battarel * * 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 From 70f2d25e71b1f1160884b92acb97a162b5dfe80f Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Sat, 25 Feb 2023 00:17:12 +0100 Subject: [PATCH 005/151] ADD input for name --- htdocs/public/onlinesign/newonlinesign.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index cd793a91bfc..a19d0f1fc7b 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -548,6 +548,7 @@ print ''; if ($action == "dosign" && empty($cancel)) { print '
'; print ''; + print ''; print '
'; print '
'; // Do not use class="reposition" here: It breaks the submit and there is a message on top to say it's ok, so going back top is better. @@ -558,7 +559,7 @@ if ($action == "dosign" && empty($cancel)) { print '