[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. f307d052ffa40d161cbe1aa32cc72b094a8d62ad
Evergreen Git
git at git.evergreen-ils.org
Thu Jul 12 09:53:14 EDT 2012
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_2 has been updated
via f307d052ffa40d161cbe1aa32cc72b094a8d62ad (commit)
from 295c3ec293ed86b5e14fabe6f6cda5a8135d4c66 (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 f307d052ffa40d161cbe1aa32cc72b094a8d62ad
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date: Thu Jul 12 09:16:12 2012 -0400
Silence undef string concatenation warning in AutoSuggest
Addressing LP #1023651 reported by Dan Scott.
When building a cache key, use processed input values that are
guaranteed to be defined rather than raw ones.
This will mean brief cache misses for AutoSuggest once applied, but
the default life of AutoSuggest cache entries is only 5 minutes anyway.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Signed-off-by: Dan Scott <dscott at laurentian.ca>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm
index c0a9246..220f1b2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm
@@ -94,9 +94,9 @@ sub prepare_headline_opts {
# Get raw autosuggest data (rows returned from a stored procedure) from the DB.
sub get_suggestions {
my $editor = shift;
- my $query = shift;
- my $search_class = shift;
- my $org_unit = shift;
+ my $query = shift || ""; # avoid noise about undef
+ my $search_class = shift || "";
+ my $org_unit = shift || -1;
my $css_prefix = shift || 'oils_AS';
my $highlight_min = int(shift || 0);
my $highlight_max = int(shift || 0);
@@ -118,12 +118,9 @@ sub get_suggestions {
$query .
$search_class .
$org_unit .
- $css_prefix .
- $highlight_min .
- $highlight_max .
$normalization .
$limit .
- $short_word_length
+ $headline_opts
);
my $res = $cache->get_cache( $key );
-----------------------------------------------------------------------
Summary of changes:
.../src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list