{
public static function _getURL($to)
{
- return self::_getURLOfType('intex', $to);
+ return static::_getURLOfType('intex', $to);
}
public function getDefaultTooltip()
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()) {
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);
}