]> _ Git - cubeextranet.git/commitdiff
wip #2303 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 18 Oct 2018 09:43:53 +0000 (09:43 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 18 Oct 2018 09:43:53 +0000 (09:43 +0000)
inc/ws/Controlleur/class.ws.services.php
inc/ws/Metier/class.ws.collection.php

index 5a9ea52a57b282e75e76688ef238b973587ead42..46f09764d340aa76de5044a551064f036243d27f 100644 (file)
@@ -816,9 +816,9 @@ class wsServices extends cubeFlashGateway
 
                $r = $core->con->select('SELECT url FROM flfref WHERE ref="' . $core->con->escape($this->args['ref']) . '"');
                if ($r->count()) {
-                       if(strpos($r->url,'http')===0) {
+                       if (strpos($r->url, 'http') === 0) {
                                header('Location: ' . $r->url);
-                       }else{
+                       } else {
                                header('Location: https://www.flf.fr' . $r->url);
                        }
                        exit;
@@ -908,7 +908,14 @@ class wsServices extends cubeFlashGateway
                                                $composition[$k]->publications[$l]->width = $book->parametres->width;
                                                $composition[$k]->publications[$l]->height = $book->parametres->height;
                                                $composition[$k]->publications[$l]->lang = $book->lang;
-                                               $langs[] = $book->lang;
+                                               $completeLang = $book->lang;
+                                               if ($book->parametres->country) {
+                                                       $composition[$k]->publications[$l]->country = $book->parametres->country;
+                                                       $completeLang .= '_' . mb_strtoupper($book->parametres->country);
+                                               }
+                                               $composition[$k]->publications[$l]->completelang = $completeLang;
+
+                                               $langs[] = $completeLang;
                                        }
                                }
 
@@ -919,7 +926,8 @@ class wsServices extends cubeFlashGateway
 
                                $contents = $collection->contents;
                                foreach ($langs as $lang) {
-                                       $langsnames[$lang] = cubeLang::getNameByCode($lang);
+                                       $e = explode('_', $lang);
+                                       $langsnames[$lang] = cubeLang::getNameByCode($e[0]);
                                        $contents[$lang]['apropos'] = $w2h->transform($contents[$lang]['apropos']);
                                        if (isset($collection->theme['ad_' . $lang])) {
                                                $ad = WS_COLLECTIONS . '/working/' . $id . '/' . $collection->theme['ad_' . $lang];
index 3c061a6ab9381e62962ec37f5db20e3a7dbc5f9f..b67f361df41079efd6f165a015cbb15dfc88f02c 100644 (file)
@@ -11,6 +11,4 @@ class wsCollection extends cubeMetier {
        protected $settings;
        protected $theme;
        protected $contents;
-}
-
-?>
+}
\ No newline at end of file