diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-13 12:33:00 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-13 12:33:00 -0700 |
commit | 2c711d8908137b6ff25941f06fe0a3f9ac02596d (patch) | |
tree | f56d813f5ee99e8d401d39c52ec877f1a27998ef /modules/user/helpers/user_event.php | |
parent | 53393a144609c0d8402b14606f52422bf3f28daf (diff) |
refactor locale related functionality out of the user module and into the gallery module.
Diffstat (limited to 'modules/user/helpers/user_event.php')
-rw-r--r-- | modules/user/helpers/user_event.php | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/modules/user/helpers/user_event.php b/modules/user/helpers/user_event.php index ede4e515..93a92589 100644 --- a/modules/user/helpers/user_event.php +++ b/modules/user/helpers/user_event.php @@ -18,14 +18,6 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class user_event_Core { - /** - * Initialization. - */ - static function gallery_ready() { - user::load_user(); - self::set_request_locale(); - } - static function admin_menu($menu, $theme) { $menu->add_after("appearance_menu", Menu::factory("link") @@ -33,21 +25,4 @@ class user_event_Core { ->label(t("Users/Groups")) ->url(url::site("admin/users"))); } - - static function set_request_locale() { - // 1. Check the session specific preference (cookie) - $locale = user::cookie_locale(); - // 2. Check the user's preference - if (!$locale) { - $locale = user::active()->locale; - } - // 3. Check the browser's / OS' preference - if (!$locale) { - $locale = locales::locale_from_http_request(); - } - // If we have any preference, override the site's default locale - if ($locale) { - I18n::instance()->locale($locale); - } - } } |