[open-ils-commits] r16026 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Mar 27 16:50:21 EDT 2010
Author: miker
Date: 2010-03-27 16:50:15 -0400 (Sat, 27 Mar 2010)
New Revision: 16026
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
Log:
add pubdate filtering support to compat wrapper
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm 2010-03-27 20:49:49 UTC (rev 16025)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm 2010-03-27 20:50:15 UTC (rev 16026)
@@ -3073,8 +3073,11 @@
my $base_plan = $parser->new( query => $base_query )->parse;
- $query = "preferred_language($args{preferred_language}) $query" if ($args{preferred_language} and !$base_plan->parse_tree->find_filter('preferred_language'));
- $query = "preferred_language_weight($args{preferred_language_weight}) $query" if ($args{preferred_language_weight} and !$base_plan->parse_tree->find_filter('preferred_language_weight') and !$base_plan->parse_tree->find_filter('preferred_language_multiplier'));
+ $query = "preferred_language($args{preferred_language}) $query"
+ if ($args{preferred_language} and !$base_plan->parse_tree->find_filter('preferred_language'));
+ $query = "preferred_language_weight($args{preferred_language_weight}) $query"
+ if ($args{preferred_language_weight} and !$base_plan->parse_tree->find_filter('preferred_language_weight') and !$base_plan->parse_tree->find_filter('preferred_language_multiplier'));
+
$query = "estimation_strategy($args{estimation_strategy}) $query" if ($args{estimation_strategy});
$query = "site($args{org_unit}) $query" if ($args{org_unit});
$query = "sort($args{sort}) $query" if ($args{sort});
@@ -3083,6 +3086,11 @@
$query = "#available $query" if ($args{available});
$query = "#descending $query" if ($args{sort_dir} && $args{sort_dir} =~ /^d/i);
$query = "#staff $query" if ($self->api_name =~ /staff/);
+ $query = "before($args{before}) $query" if (defined($args{before}) and $args{before} =~ /^\d+$/);
+ $query = "after($args{after}) $query" if (defined($args{after}) and $args{after} =~ /^\d+$/);
+ $query = "during($args{during}) $query" if (defined($args{during}) and $args{during} =~ /^\d+$/);
+ $query = "between($args{between}[0],$args{between}[1]) $query"
+ if ( ref($args{between}) and @{$args{between}} == 2 and $args{between}[0] =~ /^\d+$/ and $args{between}[1] =~ /^\d+$/ );
my (@between, at statuses, at locations, at types, at forms, at lang, at aud, at lit_form, at vformats, at bib_level);
More information about the open-ils-commits
mailing list