Merged 2.5.x into saas

This commit is contained in:
Duncan Sommerville 2014-11-05 17:36:58 -05:00
commit 4d263ce897
26 changed files with 2618 additions and 1649 deletions

View file

@ -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;
}
}