From 37256a47a4bcddc0ed71db103c764ef8d88e4128 Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Tue, 17 Sep 2024 02:31:02 +0200 Subject: [PATCH 1/5] FIX move tr position for signature link in proposals list of WebPortal (#30978) --- htdocs/webportal/class/html.formlistwebportal.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/webportal/class/html.formlistwebportal.class.php b/htdocs/webportal/class/html.formlistwebportal.class.php index ceb665bc7fa..3c0f8f2eeed 100644 --- a/htdocs/webportal/class/html.formlistwebportal.class.php +++ b/htdocs/webportal/class/html.formlistwebportal.class.php @@ -530,7 +530,6 @@ class FormListWebPortal $html .= ''; $html .= ''; } - $html .= ''; // Signature link if ($elementEn == "propal" && getDolGlobalString("PROPOSAL_ALLOW_ONLINESIGN") != 0) { if (!empty($arrayfields['signature_link']['checked'])) { @@ -538,6 +537,7 @@ class FormListWebPortal $html .= ''; } } + $html .= ''; $totalarray = array(); $totalarray['nbfield'] = 0; From a606a2e2306ff865f55fb9d1c79af450299690ef Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Tue, 17 Sep 2024 02:31:43 +0200 Subject: [PATCH 2/5] FIX member must be found to search the linked partnership (WebPortal) (#30977) --- htdocs/public/webportal/webportal.main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/webportal/webportal.main.inc.php b/htdocs/public/webportal/webportal.main.inc.php index 1f625f03e7b..8a0b647a34c 100644 --- a/htdocs/public/webportal/webportal.main.inc.php +++ b/htdocs/public/webportal/webportal.main.inc.php @@ -255,7 +255,7 @@ if (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->access $context->setEventMessage($error_msg, 'errors'); } - if (!$error) { + if (!$error && $logged_member->id > 0) { // get partnership $logged_partnership = new WebPortalPartnership($db); // @phan-suppress-next-line PhanPluginSuspiciousParamPosition From 919a3a6130c2975154e9c528f7ba18b9960ad355 Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Tue, 17 Sep 2024 02:34:05 +0200 Subject: [PATCH 3/5] FIX param id in website account list from third-party card (#30975) --- htdocs/societe/website.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index c8d531fd811..2c11655ae1c 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -329,7 +329,7 @@ llxHeader('', $title); $arrayofselected = is_array($toselect) ? $toselect : array(); -$param = ''; +$param = 'id='.$object->id; if (!empty($mode)) { $param .= '&mode='.urlencode($mode); } From bd1cf9833ad42f913a445acd2e778c1e86a78c3a Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 17 Sep 2024 02:35:26 +0200 Subject: [PATCH 4/5] Cast statut to int value (type requirement) (#30969) --- scripts/members/sync_members_ldap2dolibarr.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index e7ca87ede7c..785dd35c3ac 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -3,6 +3,7 @@ /** * Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2006-2015 Laurent Destailleur + * Copyright (C) 2024 MDW * * 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 @@ -232,7 +233,7 @@ if ($result >= 0) { if (isset($ldapuser[getDolGlobalString('LDAP_FIELD_MEMBER_STATUS')])) { $member->datec = dol_stringtotime($ldapuser[getDolGlobalString('LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE')]); $member->datevalid = dol_stringtotime($ldapuser[getDolGlobalString('LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE')]); - $member->statut = $ldapuser[getDolGlobalString('LDAP_FIELD_MEMBER_STATUS')]; + $member->statut = (int) $ldapuser[getDolGlobalString('LDAP_FIELD_MEMBER_STATUS')]; } // if ($member->statut > 1) $member->statut=1; From f2e580f46fa5e2037a0c6d35efd5f28e43f80a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2024 02:38:56 +0200 Subject: [PATCH 5/5] fix phpstan (#30958) * fix phpstan * fix phpstan * Update html.formadmin.class.php --- htdocs/core/lib/pdf.lib.php | 2 +- phpstan.neon.dist | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 861d632bc64..46966f1749d 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1389,7 +1389,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ * @param float $w Width of cells. If 0, they extend up to the right margin of the page. * @param float $h Cell minimum height. The cell extends automatically if needed. * @param string $align Align - * @param string $default_font_size Font size + * @param float $default_font_size Font size * @return float The Y PDF position */ function pdf_writeLinkedObjects(&$pdf, $object, $outputlangs, $posx, $posy, $w, $h, $align, $default_font_size) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 2bb2b98ecf9..086320babb0 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -82,7 +82,6 @@ parameters: - '#dol_getIdFromCode expects string, int given#' - '#EvalMath::trigger\(\) expects string, int given#' - '#get_next_value expects string, int given#' - - '#pdf_writeLinkedObjects expects string, int given#' - '# Diff::generatePartialDiff\(\) expects array#' - '# EmailCollector::getpart\(\) expects string#' - '#expects int, float#'