From: vincent@cubedesigners.com Date: Thu, 11 Jun 2015 11:34:05 +0000 (+0000) Subject: Fix 404 in portfolio X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=fdd6f75a3e3e63015e85b813af45981e401c79b1;p=cubedesigners-v7.git Fix 404 in portfolio Put english version online --- diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index 6d152b9..3cc2fe4 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -140,17 +140,18 @@ class Bootstrap extends CubeIT_Bootstrap { return $res; } - if ($_SERVER['HTTP_HOST'] == 'www.cubedesigners.com' && !in_array('en', $this->getAppLocalesEnabled())) { - $url = 'http://www.cubedesigners.fr' . $_SERVER['REQUEST_URI']; - return $url; - } - $path = trim($req->getPathInfo(), '/ '); $e = explode('/', $path); $locale = array_shift($e); + fb($locale); $res = '/'; + + if (!count($e)) { + return $res; + } + if ($locale == 'references_web') { $res .= 'Portfolio'; return $res; @@ -160,8 +161,18 @@ class Bootstrap extends CubeIT_Bootstrap { return false; } + if ($locale == 'fr' && $_SERVER['HTTP_HOST'] == 'www.cubedesigners.com') { + return 'http://www.cubedesigners.fr/' . $_SERVER['REQUEST_URI']; + } + if ($locale == 'en' && $_SERVER['HTTP_HOST'] == 'www.cubedesigners.fr') { + return 'http://www.cubedesigners.com/' . $_SERVER['REQUEST_URI']; + } + if (count($e) == 1) { $u = $e[0]; + if ($u == 'en') { + return $res; + } if ($u == '1-Sites-internet') { $res .= 'Projets-Web'; } elseif ($u == '2-Design-graphique') { @@ -176,21 +187,47 @@ class Bootstrap extends CubeIT_Bootstrap { $res .= 'Projets-Web'; } elseif ($u == '7-En-attente') { $res .= 'Graphisme'; + } elseif ($u == '1-Websites') { + $res .= 'Web-projects'; + } elseif ($u == '2-Graphic-design') { + $res .= 'Graphical-design'; + } elseif ($u == '3-Industrial-design') { + $res .= 'Industrial-design'; + } elseif ($u == '4-Multimedia-Games') { + $res .= 'Multimedia'; + } elseif ($u == '5-Motion-Graphics') { + $res .= 'Multimedia'; + } elseif ($u == '6-Mobile-applications') { + $res .= 'Web-projects'; + } elseif ($u == '7-Waiting') { + $res .= 'Graphical-design'; } + return $res; } if (count($e) == 3) { if ($e[0] == 'Sites-internet') { $e[0] = 'Site-Web'; - } elseif ($e[0] == 'Multimedia-Jeux') { + } elseif ($e[0] == 'Multimedia-Jeux' || $e[0] == 'Multimedia-Games') { $e[0] = 'Multimedia'; + } elseif ($e[0] == 'Motion-Graphics') { + $e[0] = 'Motion-graphics'; + } elseif ($e[0] == 'Graphic-design') { + $e[0] = 'Graphic-Design'; + } elseif ($e[0] == 'Mobile-applications') { + $e[0] = 'Websites'; } // Projects /// Mobile-applications/Heredis/114-Heredis-App => Applications-mobiles/Heredis-Heredis-App $ee = explode('-', $e[2], 2); - array_shift($ee); + $id = array_shift($ee); + /*$p=$this->getNavigation()->findOneBy('id',$locale.'/3/'.$id); + if(null!==$p){ + //return $p->getHref(); + }*/ + $res .= $e[0] . '/' . $e[1] . '-' . implode('-', $ee); return $res; } diff --git a/framework/application/controllers/RssController.php b/framework/application/controllers/RssController.php index ed93958..f44f7d0 100644 --- a/framework/application/controllers/RssController.php +++ b/framework/application/controllers/RssController.php @@ -57,8 +57,6 @@ class RssController extends CubeIT_Controller_LayoutlessController { $feed = $this->_initFeed($rss['rss_projects_title'], $rss['rss_projects_description']); foreach ($realisations as $r) { - - // Prepare feed data $title = CubeIT_Util_Cms::unserialize($r->getTitre()); $description = CubeIT_Util_Cms::unserialize($r->getDescription());