when retrieveing the user's locale, be sure to default to the parent org's settings...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Sep 2008 16:40:18 +0000 (16:40 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Sep 2008 16:40:18 +0000 (16:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10592 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm

index 8f6be2d..bdf4212 100644 (file)
@@ -1466,10 +1466,8 @@ sub get_user_locale {
 
        my $user = $e->retrieve_actor_user($user_id) or return $e->event;
 
-       # next see if their home org specifies a default locale
-       $setting = $e->search_actor_org_unit_setting(
-               {org_unit => $user->home_ou, name => 'global.default_locale'})->[0];
-       return OpenSRF::Utils::JSON->JSON2perl($setting->value) if $setting;
+    my $locale = $self->ou_ancestor_setting_value($user->home_ou, 'global.default_locale', $e);
+    return $locale if $locale;
 
        # if nothing else, fallback to locale=cowboy
        return 'en-US';