From c7a2118e0d671958ad01c8e12a37c1738a2aa3b3 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 15 Sep 2008 16:40:18 +0000 Subject: [PATCH] when retrieveing the user's locale, be sure to default to the parent org's settings where appropriate git-svn-id: svn://svn.open-ils.org/ILS/trunk@10592 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm index 8f6be2dc5b..bdf4212753 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm @@ -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'; -- 2.43.2