it appears that hidelostitems can be true here and not set to 1 in syspref
authorPaul POULAIN <paul@koha-fr.org>
Thu, 29 Nov 2007 20:22:58 +0000 (14:22 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Sun, 2 Dec 2007 20:56:31 +0000 (14:56 -0600)
in syspref it appears as "OFF", but in opac-search it's considered as true.
Changing the test to be sure syspref & opac-search consider the same thing

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
opac/opac-search.pl

index 7b50134..2cb8677 100755 (executable)
@@ -440,7 +440,7 @@ for my $this_cgi ( split('&',$limit_cgi) ) {
 
 # add OPAC 'hidelostitems'
 # not items with 
-if (C4::Context->preference('hidelostitems')) {
+if (C4::Context->preference('hidelostitems') == 1) {
        $query ="($query) not ((lost,st-numeric gt 0) or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches=''))";
        warn "Q".$query;
 }