From e469e70f3b87e1e7eaebb156692fd4915d5b76d3 Mon Sep 17 00:00:00 2001 From: btoumi Date: Thu, 5 Apr 2007 07:29:27 +0000 Subject: [PATCH] add "and" condition for branch when search is built (in advanced search) --- C4/Search.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 3b1fda34e5..c4eef801f7 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -725,8 +725,13 @@ sub buildQuery { # these are treated as AND elsif ($limit_query) { - $limit_query .= " or $limit" if $limit; - $limit_search_desc .= " or $limit" if $limit; + 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 -- 2.39.5