From: vincent@cubedesigners.com Date: Thu, 18 Oct 2018 09:43:53 +0000 (+0000) Subject: wip #2303 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=52d43f3d83e73a076f2b876d499214f846e46ede;p=cubeextranet.git wip #2303 @1 --- diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index 5a9ea52a5..46f09764d 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -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]; diff --git a/inc/ws/Metier/class.ws.collection.php b/inc/ws/Metier/class.ws.collection.php index 3c061a6ab..b67f361df 100644 --- a/inc/ws/Metier/class.ws.collection.php +++ b/inc/ws/Metier/class.ws.collection.php @@ -11,6 +11,4 @@ class wsCollection extends cubeMetier { protected $settings; protected $theme; protected $contents; -} - -?> +} \ No newline at end of file