fixing redirect on config after language change

pull/89/head
Pepijn Over 2014-04-25 00:25:15 +02:00
parent d79ba42e85
commit a2eacb2bce
1 changed files with 9 additions and 9 deletions

View File

@ -186,6 +186,8 @@ class ConfigController extends AbstractController {
if($changed) {
$this->addMessage(psm_get_lang('config', 'updated'), 'success');
} else {
$this->addMessage(psm_get_lang('config', 'nochanges'));
}
if(!empty($_POST['test_email'])) {
@ -215,12 +217,10 @@ class ConfigController extends AbstractController {
$this->addMessage(psm_get_lang('config', 'sms_error'), 'error');
}
}
} elseif(!$changed) {
$this->addMessage(psm_get_lang('config', 'nochanges'));
}
if($clean['language'] != psm_get_conf('language')) {
header('Location: ' . $_SERVER['REQUEST_URI']);
header('Location: ' . psm_build_url(array('mod' => 'config'), true, false));
die();
}