[open-ils-commits] r10592 - trunk/Open-ILS/src/perlmods/OpenILS/Application

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Sep 15 12:40:21 EDT 2008


Author: erickson
Date: 2008-09-15 12:40:18 -0400 (Mon, 15 Sep 2008)
New Revision: 10592

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
Log:
when retrieveing the user's locale, be sure to default to the parent org's settings where appropriate

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2008-09-15 16:39:31 UTC (rev 10591)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2008-09-15 16:40:18 UTC (rev 10592)
@@ -1466,10 +1466,8 @@
 
 	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';



More information about the open-ils-commits mailing list