[open-ils-commits] r11869 - branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Jan 17 11:12:18 EST 2009


Author: miker
Date: 2009-01-17 11:12:16 -0500 (Sat, 17 Jan 2009)
New Revision: 11869

Modified:
   branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
segregate status cache by locale (though perhaps they should not be cached at all)

Modified: branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2009-01-17 04:43:41 UTC (rev 11868)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2009-01-17 16:12:16 UTC (rev 11869)
@@ -1276,11 +1276,12 @@
 	method	=> "retrieve_all_copy_statuses",
 	api_name	=> "open-ils.search.config.copy_status.retrieve.all" );
 
-my $copy_statuses;
+my %copy_statuses;
 sub retrieve_all_copy_statuses {
 	my( $self, $client ) = @_;
-	return $copy_statuses if $copy_statuses;
-	return $copy_statuses = 
+    my $locale = $client->session->session_locale || 'en-US';
+	return $copy_statuses{$locale} if $copy_statuses{$locale};
+	return $copy_statuses{$locale} = 
 		new_editor()->retrieve_all_config_copy_status();
 }
 



More information about the open-ils-commits mailing list