[Koha-patches] [PATCH 40/55] MT2467 : limit available reenabling
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Wed Mar 10 22:26:22 CET 2010
From: Paul Poulain <paul.poulain at biblibre.com>
available was passed both as a parameter and a limit
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>
---
C4/Search.pm | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/C4/Search.pm b/C4/Search.pm
index e74f147..6520b0e 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1260,21 +1260,21 @@ sub buildQuery {
my $group_OR_limits;
my $availability_limit;
foreach my $this_limit (@limits) {
-# if ( $this_limit =~ /available/ ) {
+ if ( $this_limit =~ /available/ ) {
#
## 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0)
## In English:
## all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0
-# $availability_limit .=
-#"( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and (lost,st-numeric=0) )"; #or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='')) )";
-# $limit_cgi .= "&limit=available";
-# $limit_desc .= "";
-# }
+ $availability_limit .=
+"( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and (lost,st-numeric=0) )"; #or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='')) )";
+ $limit_cgi .= "&limit=available";
+ $limit_desc .= "";
+ }
#
# group_OR_limits, prefixed by mc-
# OR every member of the group
-# elsif ( $this_limit =~ /mc/ ) {
- if ( $this_limit =~ /mc/ ) {
+ elsif ( $this_limit =~ /mc/ ) {
+# if ( $this_limit =~ /mc/ ) {
$group_OR_limits .= " or " if $group_OR_limits;
$limit_desc .= " or " if $group_OR_limits;
$group_OR_limits .= "$this_limit";
--
1.6.3.3
More information about the Koha-patches
mailing list