segregate status cache by locale (though perhaps they should not be cached at all)
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 17 Jan 2009 16:12:16 +0000 (16:12 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 17 Jan 2009 16:12:16 +0000 (16:12 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11869 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm

index aa5824c..b0f0066 100644 (file)
@@ -1276,11 +1276,12 @@ __PACKAGE__->register_method(
        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();
 }