From 5953b3b994859e7342556f3907e989267174f2a7 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 27 Sep 2013 14:34:03 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.services.php | 10 ++++++++++ inc/ws/Util/html5/class.ws.html5.links.php | 19 ++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index 3ffd6724d..b723d9a75 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -594,6 +594,16 @@ class wsServices extends cubeFlashGateway { header('Location: http://www.wesco-eshop.fr'); } + public function flfRef() { + global $core; + + $r = $core->con->select('SELECT url FROM flfref WHERE ref="' . $core->con->escape($ref) . '"'); + if ($r->count()) { + header('Location: ' . $r->url); + exit; + } + } + public function collection() { global $core; $id = $this->callArgs[0]; diff --git a/inc/ws/Util/html5/class.ws.html5.links.php b/inc/ws/Util/html5/class.ws.html5.links.php index 28e47443b..7b0aec0b6 100644 --- a/inc/ws/Util/html5/class.ws.html5.links.php +++ b/inc/ws/Util/html5/class.ws.html5.links.php @@ -52,12 +52,13 @@ class wsHTML5Link { } else { return new videoPopupLink($id, $init, $compiler); } - case 7: if ($compiler->book->parametres->customLinkClass == 'WescoLink') { return new wescoLink($id, $init, $compiler); } else if ($compiler->book->parametres->customLinkClass == 'HaguenauManifLink') { return new haguenauManifLink($id, $init, $compiler); + } else if ($compiler->book->parametres->customLinkClass == 'FLFLink') { + return new flfLink($id, $init, $compiler); } case 8: case 9: @@ -142,9 +143,9 @@ class wsHTML5Link { public function getTooltip() { if (is_null($this->infobulle) || !$this->infobulle) { - return '~' .$this->getDefaultTooltip(); + return '~' . $this->getDefaultTooltip(); } - return $this->infobulle; + return $this->infobulle; } public function getHTMLContainer() { @@ -637,6 +638,18 @@ class wescoLink extends normalLink { } +class flfLink extends wescoLink { + + public function getURL() { + return 'http://workshop.fluidbook.com/services/flfRef?ref=' . $this->to; + } + + public function getTarget() { + return '_blank'; + } + +} + class haguenauManifLink extends internalLink { public function getPage() { -- 2.39.5