Merged 2.5.x into saas
This commit is contained in:
commit
4d263ce897
26 changed files with 2618 additions and 1649 deletions
|
@ -62,5 +62,22 @@ class Application_Model_Locale
|
|||
textdomain('airtime');
|
||||
}
|
||||
|
||||
/**
|
||||
* We need this function for the case where a user has logged out, but
|
||||
* has an airtime_locale cookie containing their locale setting.
|
||||
*
|
||||
* If the user does not have an airtime_locale cookie set, we default
|
||||
* to the station locale.
|
||||
*
|
||||
* When the user logs in, the value set in the login form will be passed
|
||||
* into the airtime_locale cookie. This cookie is also updated when
|
||||
* a user updates their user settings.
|
||||
*/
|
||||
public static function getUserLocale() {
|
||||
$request = Zend_Controller_Front::getInstance()->getRequest();
|
||||
$locale = $request->getCookie('airtime_locale', Application_Model_Preference::GetLocale());
|
||||
return $locale;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue