koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4 Search.pm


From: Bruno Toumi
Subject: [Koha-cvs] koha/C4 Search.pm
Date: Thu, 05 Apr 2007 07:29:27 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Changes by:     Bruno Toumi <btoumi>    07/04/05 07:29:27

Modified files:
        C4             : Search.pm 

Log message:
        add "and" condition for branch when search is built (in advanced search)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&r1=1.129&r2=1.130

Patches:
Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -b -r1.129 -r1.130
--- Search.pm   29 Mar 2007 13:30:31 -0000      1.129
+++ Search.pm   5 Apr 2007 07:29:27 -0000       1.130
@@ -25,7 +25,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.129 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.130 $' =~ /\d+/g;
     shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
 };
 
@@ -725,9 +725,14 @@
 
         # these are treated as AND
         elsif ($limit_query) {
+           if ($limit =~ /branch/){
+                       $limit_query       .= " ) and ( $limit" if $limit;
+                       $limit_search_desc .= " ) and ( $limit" if $limit;
+               }else{
             $limit_query       .= " or $limit" if $limit;
             $limit_search_desc .= " or $limit" if $limit;
         }
+        }
 
         # otherwise, there is nothing but the limit
         else {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]