[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. d2dca2ec9482233d97bcd410e5aaf2c8ceef3474
Evergreen Git
git at git.evergreen-ils.org
Mon Sep 16 18:31:27 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_3 has been updated
via d2dca2ec9482233d97bcd410e5aaf2c8ceef3474 (commit)
from ca021fac379e8141f18faa3ec22c28899c268df7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d2dca2ec9482233d97bcd410e5aaf2c8ceef3474
Author: Mike Rylander <mrylander at gmail.com>
Date: Fri Aug 30 11:22:27 2013 -0400
Have TPAC put user input at the end in all cases
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index efac1fa..4d455c7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -75,29 +75,30 @@ sub _prepare_biblio_search {
foreach (grep /^fg:/, $cgi->param) {
/:(-?\w+)$/ or next;
my $term = join(",", $cgi->param($_));
- $query .= " filter_group_entry($term)" if length $term;
+ $query = "filter_group_entry($term) $query" if length $term;
}
if ($cgi->param("bookbag")) {
- $query .= " container(bre,bookbag," . int($cgi->param("bookbag")) . ")";
+ $query = "container(bre,bookbag," . int($cgi->param("bookbag")) . ") $query";
}
# Journal title hackery complete
if ($cgi->param("qtype") && $cgi->param("qtype") eq "jtitle") {
- $query .= " bib_level(s)";
+ $query = "bib_level(s) $query";
}
if ($cgi->param('pubdate') && $cgi->param('date1')) {
if ($cgi->param('pubdate') eq 'between') {
- $query .= ' between(' . $cgi->param('date1');
- $query .= ',' . $cgi->param('date2') if $cgi->param('date2');
- $query .= ')';
+ my $btw = 'between(' . $cgi->param('date1');
+ $btw .= ',' . $cgi->param('date2') if $cgi->param('date2');
+ $btw .= ')';
+ $query = "$btw $query";
} elsif ($cgi->param('pubdate') eq 'is') {
- $query .= ' between(' . $cgi->param('date1') .
- ',' . $cgi->param('date1') . ')'; # sic, date1 twice
+ $query = 'between(' . $cgi->param('date1') .
+ ',' . $cgi->param('date1') . ") $query"; # sic, date1 twice
} else {
- $query .= ' ' . $cgi->param('pubdate') .
- '(' . $cgi->param('date1') . ')';
+ $query = $cgi->param('pubdate') .
+ '(' . $cgi->param('date1') . ") $query";
}
}
@@ -110,9 +111,9 @@ sub _prepare_biblio_search {
if ($cgi->param('sort')) {
$query =~ s/sort\([^\)]*\)//g; # override existing sort(). no stacking.
my ($axis, $desc) = split /\./, $cgi->param('sort');
- $query .= " sort($axis)";
+ $query = "sort($axis) $query";
if ($desc and not $query =~ /\#descending/) {
- $query .= '#descending';
+ $query = "#descending $query";
} elsif (not $desc) {
$query =~ s/\#descending//;
}
@@ -131,11 +132,11 @@ sub _prepare_biblio_search {
my $pref_ou = $ctx->{pref_ou};
if (defined($pref_ou) and $pref_ou ne '' and $pref_ou != $org and ($pref_ou ne $ctx->{aou_tree}->()->id)) {
my $plib = $ctx->{get_aou}->($pref_ou)->shortname;
- $query .= " pref_ou($plib)";
+ $query = "pref_ou($plib) $query";
}
if (my $grp = $ctx->{copy_location_group}) {
- $query .= " location_groups($grp)";
+ $query = "location_groups($grp) $query";
}
if(!$site) {
@@ -405,7 +406,7 @@ sub load_rresults {
# Stuff these into the TT context so that templates can use them in redrawing forms
$ctx->{processed_search_query} = $query;
- $query .= " $_" for @facets;
+ $query = "$_ $query" for @facets;
$logger->activity("EGWeb: [search] $query");
-----------------------------------------------------------------------
Summary of changes:
.../perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm | 31 ++++++++++---------
1 files changed, 16 insertions(+), 15 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list