]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 27 Sep 2013 14:34:03 +0000 (14:34 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 27 Sep 2013 14:34:03 +0000 (14:34 +0000)
inc/ws/Controlleur/class.ws.services.php
inc/ws/Util/html5/class.ws.html5.links.php

index 3ffd6724dabcb42cbad52808cbc7b1565a03793e..b723d9a7588aa1e08fd6796bf314c603f5d9201f 100644 (file)
@@ -594,6 +594,16 @@ class wsServices extends cubeFlashGateway {
                header('Location: http://www.wesco-eshop.fr');\r
        }\r
 \r
+       public function flfRef() {\r
+               global $core;\r
+\r
+               $r = $core->con->select('SELECT url FROM flfref WHERE ref="' . $core->con->escape($ref) . '"');\r
+               if ($r->count()) {\r
+                       header('Location: ' . $r->url);\r
+                       exit;\r
+               }\r
+       }\r
+\r
        public function collection() {\r
                global $core;\r
                $id = $this->callArgs[0];\r
index 28e47443b146a229d43d40b531c895fc6d09d9c3..7b0aec0b6aa6a2119036b6e4b24b01f54d21626e 100644 (file)
@@ -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() {