[open-ils-commits] [GIT] Evergreen ILS branch master updated. 3b2705a0b32580ab3aec9090669a7d0386ca7843

Evergreen Git git at git.evergreen-ils.org
Thu Jul 12 09:52:47 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, master has been updated
       via  3b2705a0b32580ab3aec9090669a7d0386ca7843 (commit)
      from  fe78c09e77a439e8f454195e0ec139d32cb2a050 (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 3b2705a0b32580ab3aec9090669a7d0386ca7843
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