From dbe02a42c2e4f24e36254a2da54e9b51f8ae3d16 Mon Sep 17 00:00:00 2001 From: Timothee Date: Thu, 14 Apr 2022 12:05:41 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04888=20New=20url()=20placeholder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dbobject.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/dbobject.class.php b/core/dbobject.class.php index b353c23db..394c16fc2 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -4386,14 +4386,22 @@ abstract class DBObject implements iDisplay $sAttCode = $sPlaceholderAttCode; } - if ($sVerb == 'hyperlink') + if (in_array($sVerb, ['hyperlink', 'url'])) { $sPortalId = ($sAttCode === '') ? 'console' : $sAttCode; if (!array_key_exists($sPortalId, self::$aPortalToURLMaker)) { throw new Exception("Unknown portal id '$sPortalId' in placeholder '$sPlaceholderAttCode''"); } - $ret = $this->GetHyperlink(self::$aPortalToURLMaker[$sPortalId], false); + + if($sVerb == 'hyperlink') + { + $ret = $this->GetHyperlink(self::$aPortalToURLMaker[$sPortalId], false); + } + else + { + $ret = ApplicationContext::MakeObjectUrl(get_class($this), $this->GetKey(), self::$aPortalToURLMaker[$sPortalId], false); + } } else {