[open-ils-commits] r8895 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Mar 7 11:12:46 EST 2008


Author: miker
Date: 2008-03-07 10:40:07 -0500 (Fri, 07 Mar 2008)
New Revision: 8895

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
Log:
adding preferred lang support to the new perl, and adjusting the depth test logic

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm	2008-03-07 15:19:01 UTC (rev 8894)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm	2008-03-07 15:40:07 UTC (rev 8895)
@@ -2313,7 +2313,6 @@
 	my %args = @_;
 	
 	my $ou = $args{org_unit};
-	my $pref_lang = $args{prefered_language} || 'eng'; # XXX not used currently
 	my $limit = $args{limit} || 10;
 	my $offset = $args{offset} || 0;
 
@@ -2415,7 +2414,7 @@
 	}
 
 	my $param_search_ou = $ou;
-	my $param_depth = $args{depth}; $param_depth ||= 'NULL'
+	my $param_depth = $args{depth}; $param_depth = 'NULL' unless (defined($param_depth) and length($param_depth) > 0 );
     my $param_searches = OpenSRF::Utils::JSON->perl2JSON( \%stored_proc_search_args ); $param_searches =~ s/\$//go; $param_searches = '$$'.$param_searches.'$$';
     my $param_statuses = '$${' . join(',', map { s/\$//go } @statuses) . '}$$';
     my $param_audience = '$${' . join(',', map { s/\$//go } @aud) . '}$$';
@@ -2424,6 +2423,8 @@
     my $param_types = '$${' . join(',', map { s/\$//go } @types) . '}$$';
     my $param_forms = '$${' . join(',', map { s/\$//go } @forms) . '}$$';
     my $param_vformats = '$${' . join(',', map { s/\$//go } @vformats) . '}$$';
+	my $param_pref_lang = $args{prefered_language}; $param_perf_lang =~ s/\$//go; $param_perf_lang = '$$'.$param_perf_lang.'$$';
+	my $param_pref_lang_multiplier = $args{prefered_language_weight}; $param_perf_lang_multiplier ||= 'NULL';
 	my $param_sort = $args{'sort'}; $param_sort =~ s/\$//go; $param_sort = '$$'.$param_sort.'$$';
 	my $param_sort_desc = (defined($args{sort_dir}) && $args{sort_dir} =~ /^d/io ? "'t'" : "'f'");
 	my $metarecord = ($self->api_name =~ /metabib/o) ? "'t'" : "'f'");
@@ -2445,6 +2446,8 @@
                     $param_types,
                     $param_forms,
                     $param_vformats,
+                    $param_pref_lang,
+                    $param_pref_lang_multiplier,
                     $param_sort,
                     $param_sort_desc,
                     $metarecord,



More information about the open-ils-commits mailing list