Skip to content

Commit

Permalink
Dev: fixed issue if refurl is not set
Browse files Browse the repository at this point in the history
Dev : fix the fix: $defaultlanguage/$defaultlang
  • Loading branch information
Shnoulle committed Apr 30, 2012
1 parent cf785f9 commit 7adf53c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/controllers/admin/globalsettings.php
Expand Up @@ -106,8 +106,8 @@ private function _saveSettings()

$defaultlang = sanitize_languagecode($_POST['defaultlang']);
$aRestrictToLanguages = explode(' ', sanitize_languagecodeS($_POST['restrictToLanguages']));
if (!in_array($defaultLanguage,$aRestrictToLanguages)){ // Force default language in restrictToLanguages
$aRestrictToLanguages[]=$defaultLanguage;
if (!in_array($defaultlang,$aRestrictToLanguages)){ // Force default language in restrictToLanguages
$aRestrictToLanguages[]=$defaultlang;
}
if (count(array_diff(array_keys(getLanguageData(false,Yii::app()->session['adminlang'])), $aRestrictToLanguages)) == 0) {
$aRestrictToLanguages = '';
Expand Down Expand Up @@ -176,7 +176,7 @@ private function _saveSettings()
Yii::app()->session['flashmessage'] = $clang->gT("Global settings were saved.");

$url = htmlspecialchars_decode(Yii::app()->session['refurl']);
CController::redirect($url);
if($url){CController::redirect($url);}
}

private function _checkSettings()
Expand Down

0 comments on commit 7adf53c

Please sign in to comment.