]> _ Git - cubeextranet.git/commitdiff
wait #5438 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Sep 2022 10:10:51 +0000 (10:10 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Sep 2022 10:10:51 +0000 (10:10 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index e2947d05803a3f3d97d653fde21cc9f7c995aa67..77a0eb46e7c0fd430595fcba57972b7b347c3357 100644 (file)
@@ -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);
     }