Source
630 foreach ( Multilingual::$langs as $key => $value ) {
631 foreach ( $value as $key_2=> $value_2 ) {
632 $short_array[] = $key_2;
633 }
634 }
635
636 if ( ! in_array($last, $short_array)) {
637 if ( ! isset($_SESSION) ) { session_start(); }
638 if ( ! isset($_SESSION['routed']) ) {
639 $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
640 $_SESSION['routed'] = "routed";
641
642 if ( in_array($lang, $short_array) ) {
643 //$this->redirect(Director::baseUrl().$lang);
644 $this->redirect($this->LangLink($lang));
645 unset($_SESSION['routed']);
Trace
- GeneralPage_Controller->init()
Page.php:603
- Page_Controller->init()
HomePage.php:195
- HomePage_Controller->init()
Controller.php:136
- Controller->handleRequest(SS_HTTPRequest,DataModel)
ContentController.php:174
- ContentController->handleRequest(SS_HTTPRequest,DataModel)
MultilingualPage.php:281
- MultilingualPage_Controller->handleRequest(SS_HTTPRequest,DataModel)
GeneralPage.php:765
- GeneralPage_Controller->handleRequest(SS_HTTPRequest,DataModel)
ModelAsController.php:75
- ModelAsController->handleRequest(SS_HTTPRequest,DataModel)
RootURLController.php:130
- RootURLController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:385
- Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:149
- Director::direct(/,DataModel)
main.php:211