Index: languages_item.php =================================================================== --- languages_item.php (revision 15602) +++ languages_item.php (working copy) @@ -207,19 +207,14 @@ $res = parent::Load(1, 'PrimaryLang', $cachable); } - if ( - !$this->Application->isAdmin && !defined('GW_NOTIFY') && preg_match('/[\/]{0,1}index.php[\/]{0,1}/', $_SERVER['PHP_SELF']) && - $this->Application->HttpQuery->isEmptyUrl() && $this->Application->ConfigValue('UseContentLanguageNegotiation') + if ( !$this->Application->isAdmin && !defined('GW_NOTIFY') && preg_match('/[\/]{0,1}index.php[\/]{0,1}/', $_SERVER['PHP_SELF']) && $this->Application->ConfigValue('UseContentLanguageNegotiation') && !$this->Application->HttpQuery->refererIsOurSite() ) { $language_id = $this->processAcceptLanguage(); - if ($language_id != $this->GetID()) { + if ( $language_id != $this->GetID() ) { // redirect to same page with found language - $url_params = Array ( - 'm_cat_id' => 0, 'm_cat_page' => 1, - 'm_lang' => $language_id, 'm_opener' => 's', - 'pass' => 'm' - ); + $url_params = Array ('m_cat_id' => 0, 'm_cat_page' => 1, 'm_lang' => $language_id, + 'm_opener' => 's', 'pass' => 'm'); $this->_addLoginState($url_params); $exception = new kRedirectException('Redirect into language ID = ' . $language_id . ' according to "Accepted-Language" header "' . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . '"');