Skip to content
Snippets Groups Projects
Commit d69afdc2 authored by Olav Morken's avatar Olav Morken
Browse files

core:LanguageAdaptor: Use set/getLanguageCookie.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2411 44740490-163a-0410-bde0-09ae8108e29a
parent 83ad8e00
No related branches found
No related tags found
No related merge requests found
......@@ -45,9 +45,7 @@ class sspmod_core_Auth_Process_LanguageAdaptor extends SimpleSAML_Auth_Processin
if (array_key_exists($this->langattr, $attributes))
$attrlang = $attributes[$this->langattr][0];
$config = SimpleSAML_Configuration::getInstance();
$t = new SimpleSAML_XHTML_Template($config, 'frontpage');
$lang = $t->getLanguage(FALSE, FALSE);
$lang = SimpleSAML_XHTML_Template::getLanguageCookie();
if (isset($attrlang))
......@@ -58,8 +56,7 @@ class sspmod_core_Auth_Process_LanguageAdaptor extends SimpleSAML_Auth_Processin
if (isset($attrlang) && !isset($lang)) {
/* Language set in attribute but not in cookie - update cookie. */
$t->setLanguage($attrlang);
$_GET['language'] = $attrlang;
SimpleSAML_XHTML_Template::setLanguageCookie($attrlang);
} elseif (!isset($attrlang) && isset($lang)) {
/* Language set in cookie, but not in attribute. Update attribute. */
$request['Attributes'][$this->langattr] = array($lang);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment