[Koha-cvs] koha/C4 SearchMarc.pm Search.pm [rel_2_2]
paul poulain
paul at koha-fr.org
Thu Aug 3 12:24:09 CEST 2006
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: paul poulain <tipaul> 06/08/03 10:24:09
Modified files:
C4 : SearchMarc.pm Search.pm
Log message:
fix for #1114 : Marking item lost doesn't hide it in OPAC when hidelostitems is set
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/SearchMarc.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.36.2.32&r2=1.36.2.33
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.99.2.13&r2=1.99.2.14
Patches:
Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.36.2.32
retrieving revision 1.36.2.33
diff -u -b -r1.36.2.32 -r1.36.2.33
--- SearchMarc.pm 25 Jul 2006 12:32:38 -0000 1.36.2.32
+++ SearchMarc.pm 3 Aug 2006 10:24:09 -0000 1.36.2.33
@@ -396,7 +396,7 @@
$sth_itemCN = $dbh->prepare("
SELECT items.holdingbranch, items.location, items.itemcallnumber, count(*) AS cnt, items.itemnumber, items.notforloan
FROM items
- WHERE biblionumber=? AND (itemlost = 0 OR itemlost IS NULL) AND (notforloan < 1 OR notforloan IS NULL)
+ WHERE biblionumber=? AND (itemlost = 0 OR itemlost IS NULL)
GROUP BY items.holdingbranch, items.location, items.itemcallnumber
ORDER BY homebranch");
} else {
Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.99.2.13
retrieving revision 1.99.2.14
diff -u -b -r1.99.2.13 -r1.99.2.14
--- Search.pm 25 Jul 2006 12:33:04 -0000 1.99.2.13
+++ Search.pm 3 Aug 2006 10:24:09 -0000 1.99.2.14
@@ -30,7 +30,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.99.2.13 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.99.2.14 $' =~ /\d+/g;
shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
=head1 NAME
@@ -1306,12 +1306,10 @@
WHERE items.biblionumber = ?
AND biblioitems.biblioitemnumber = items.biblioitemnumber
AND biblio.biblionumber = items.biblionumber";
-# buggy : opac & librarian interface can show the same info level & itemstatus should not be hardcoded
-# if ($type ne 'intra'){
-# $query .= " and ((items.itemlost<>1 and items.itemlost <> 2)
-# or items.itemlost is NULL)
-# and (wthdrawn <> 1 or wthdrawn is NULL)";
-# }
+ if ($type ne 'intra' && C4::Context->preference('hidelostitems')) {
+ $query .= " and (items.itemlost<1 or items.itemlost is NULL)
+ and (wthdrawn <> 1 or wthdrawn is NULL)";
+ }
$query .= " order by items.homebranch, items.dateaccessioned desc";
my $sth=$dbh->prepare($query);
$sth->execute($biblionumber);
More information about the Koha-cvs
mailing list