[Koha-cvs] koha/C4 BookShelves.pm [rel_3_0]
paul poulain
paul at koha-fr.org
Mon Oct 30 10:50:20 CET 2006
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: paul poulain <tipaul> 06/10/30 09:50:20
Modified files:
C4 : BookShelves.pm
Log message:
removing getiteminformations (using direct SQL, as we are in a .pm, so it's "legal")
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/BookShelves.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.15.8.2&r2=1.15.8.3
Patches:
Index: BookShelves.pm
===================================================================
RCS file: /sources/koha/koha/C4/BookShelves.pm,v
retrieving revision 1.15.8.2
retrieving revision 1.15.8.3
diff -u -b -r1.15.8.2 -r1.15.8.3
--- BookShelves.pm 31 Aug 2006 16:03:52 -0000 1.15.8.2
+++ BookShelves.pm 30 Oct 2006 09:50:20 -0000 1.15.8.3
@@ -3,7 +3,7 @@
package C4::BookShelves;
-# $Id: BookShelves.pm,v 1.15.8.2 2006/08/31 16:03:52 toins Exp $
+# $Id: BookShelves.pm,v 1.15.8.3 2006/10/30 09:50:20 tipaul Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -30,7 +30,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.15.8.2 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.15.8.3 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
=head1 NAME
@@ -170,16 +170,16 @@
sub GetShelfContents {
my ( $shelfnumber ) = @_;
my @itemlist;
- my $query = qq(
- SELECT itemnumber
- FROM shelfcontents
- WHERE shelfnumber=?
- ORDER BY itemnumber
- );
+ my $query = "SELECT itemnumber FROM shelfcontents WHERE shelfnumber=? ORDER BY itemnumber";
my $sth = $dbh->prepare($query);
$sth->execute($shelfnumber);
+ my $sth2 = $dbh->prepare("SELECT biblio.*,biblioitems.* FROM items
+ LEFT JOIN biblio on items.biblionumber=biblio.biblionumber
+ LEFT JOIN biblioitems on items.biblionumber=biblioitems.biblionumber
+ WHERE items.itemnumber=?");
while ( my ($itemnumber) = $sth->fetchrow ) {
- my ($item) = getiteminformation( $itemnumber, 0 );
+ $sth2->execute($itemnumber);
+ my $item = $sth2->fetchrow_hashref;
push( @itemlist, $item );
}
return ( \@itemlist );
@@ -427,6 +427,9 @@
#
# $Log: BookShelves.pm,v $
+# Revision 1.15.8.3 2006/10/30 09:50:20 tipaul
+# removing getiteminformations (using direct SQL, as we are in a .pm, so it's "legal")
+#
# Revision 1.15.8.2 2006/08/31 16:03:52 toins
# Add Pod to DelShelf
#
More information about the Koha-cvs
mailing list