[open-ils-commits] r13285 - branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Jun 1 16:45:23 EDT 2009


Author: erickson
Date: 2009-06-01 16:45:19 -0400 (Mon, 01 Jun 2009)
New Revision: 13285

Modified:
   branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
make the input test a little more strict (require the presence of a search term)

Modified: branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2009-06-01 20:44:58 UTC (rev 13284)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2009-06-01 20:45:19 UTC (rev 13285)
@@ -781,7 +781,10 @@
     $method .= '.staff' if $self->api_name =~ /staff$/;
     $method .= '.atomic';
                 
-    return {count => 0} unless ($search_hash and $search_hash->{searches});
+    return {count => 0} unless (
+        $search_hash and 
+        $search_hash->{searches} and 
+        scalar( keys %{$search_hash->{searches}} ));
 
     my $search_duration;
     my $user_offset = $search_hash->{offset} || 0; # user-specified offset



More information about the open-ils-commits mailing list