use CakeSession wrapper

This commit is contained in:
euromark 2012-11-27 00:09:21 +01:00
parent 5870d71e84
commit c3e501b2d9

View file

@ -23,6 +23,7 @@
App::uses('CakePlugin', 'Core');
App::uses('L10n', 'I18n');
App::uses('Multibyte', 'I18n');
App::uses('CakeSession', 'Model/Datasource');
/**
* I18n handles translation of Text and time format strings.
@ -142,9 +143,10 @@ class I18n {
}
if (empty($language)) {
if (!empty($_SESSION['Config']['language'])) {
$language = $_SESSION['Config']['language'];
} else {
if (CakeSession::started()) {
$language = CakeSession::read('Config.language');
}
if (empty($language)) {
$language = Configure::read('Config.language');
}
}