From 563cdcefb3155d1c0dcd340eae94f245a49183db Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Wed, 4 Oct 2023 00:10:19 +0200 Subject: [PATCH] fix #26104 : remove global object --- htdocs/core/lib/signature.lib.php | 36 ++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index db980561127..7eb4f8333c3 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -20,11 +20,12 @@ /** * Return string with full online Url to accept and sign a quote * - * @param string $type Type of URL ('proposal', ...) - * @param string $ref Ref of object + * @param string $type Type of URL ('proposal', ...) + * @param string $ref Ref of object + * @param CommonObject $obj object (needed to make multicompany good links) * @return string Url string */ -function showOnlineSignatureUrl($type, $ref) +function showOnlineSignatureUrl($type, $ref, CommonObject $obj = null) { global $langs; @@ -34,7 +35,7 @@ function showOnlineSignatureUrl($type, $ref) $servicename = 'Online'; $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlineSignature", $servicename).'
'; - $url = getOnlineSignatureUrl(0, $type, $ref); + $url = getOnlineSignatureUrl(0, $type, $ref, $obj); $out .= '