From: vincent@cubedesigners.com Date: Thu, 8 Sep 2022 10:10:51 +0000 (+0000) Subject: wait #5438 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=090ffff89c3b0a5b0eaf896b3580dccf3f24c6e7;p=cubeextranet.git wait #5438 @2 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index e2947d058..77a0eb46e 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -2491,7 +2491,7 @@ class intexLink extends wescoLink { public static function _getURL($to) { - return self::_getURLOfType('intex', $to); + return static::_getURLOfType('intex', $to); } public function getDefaultTooltip() @@ -2517,6 +2517,10 @@ class wescoLink extends normalLink protected static function _getURLOfType($type, $ref) { global $core; + $e = explode(':', $ref, 2); + if (count($e) == 2 && $e[0] == $type) { + $ref = $e[1]; + } $nospaceref = str_replace(' ', '', $ref); $r = $core->con->select("SELECT * FROM wsref WHERE (ref='" . $core->con->escape($ref) . "' OR ref='" . $core->con->escape($nospaceref) . "') AND type='" . $core->con->escape($type) . "'"); if ($r->count()) { @@ -2737,11 +2741,18 @@ class customLink extends wescoLink public static function getCustomInstance($id, $init, &$compiler) { $e = explode(':', $init['to']); + if ($e[0] === 'custom') { + array_shift($e); + } if ($e[0] == '10doigts') { $init['to'] = self::_getURL($init['to']); $init['iframeType'] = '10doigts'; $init['infobulle'] = 'Voir le produit'; return new iframePopupLink($id, $init, $compiler); + } else if ($e[0] == 'intex') { + array_shift($e); + $init['to'] = implode(':', $e); + return new intexLink($id, $init, $compiler); } return new customLink($id, $init, $compiler); }