Skip to content

Commit

Permalink
[fix] Language can be updated during survey
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Mar 2, 2017
1 parent 0397f4f commit 7f6b80c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,9 @@ Only partial changelog, [commit history](https://framagit.org/Shnoulle/LimeSurve

## Not released

### Fix
- Language can be updated during survey

### Feature
- Leave partial HTML in admin email

Expand Down
10 changes: 1 addition & 9 deletions application/core/LSWebUser.php
Expand Up @@ -9,14 +9,6 @@ class LSWebUser extends CWebUser
public function __construct()
{
$this->loginUrl = Yii::app()->createUrl('admin/authentication', array('sa' => 'login'));

// Try to fix missing language in plugin controller
if (empty(Yii::app()->session['adminlang']))
{
Yii::app()->session["adminlang"] = Yii::app()->getConfig("defaultlang");
}

Yii::app()->setLanguage(Yii::app()->session['adminlang']);
}

public function checkAccess($operation, $params = array(), $allowCaching = true)
Expand Down Expand Up @@ -94,4 +86,4 @@ public function hasState($key)
}

}
?>
?>

0 comments on commit 7f6b80c

Please sign in to comment.