[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4/Circulation Circ2.pm [rel_3_0]
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/C4/Circulation Circ2.pm [rel_3_0] |
Date: |
Thu, 31 Aug 2006 10:00:45 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: Antoine Farnault <toins> 06/08/31 10:00:45
Modified files:
C4/Circulation : Circ2.pm
Log message:
getiteminformation & getpatroninformation return 'undef' either
$env->{'apierror'}... if an error occur.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ2.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.114.2.1&r2=1.114.2.2
Patches:
Index: Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.114.2.1
retrieving revision 1.114.2.2
diff -u -b -r1.114.2.1 -r1.114.2.2
--- Circ2.pm 30 Aug 2006 16:38:51 -0000 1.114.2.1
+++ Circ2.pm 31 Aug 2006 10:00:45 -0000 1.114.2.2
@@ -3,7 +3,7 @@
package C4::Circulation::Circ2;
-# $Id: Circ2.pm,v 1.114.2.1 2006/08/30 16:38:51 toins Exp $
+# $Id: Circ2.pm,v 1.114.2.2 2006/08/31 10:00:45 toins Exp $
#package to deal with Returns
#written 3/11/99 by address@hidden
@@ -255,8 +255,7 @@
$sth = $dbh->prepare("select * from borrowers where
cardnumber=?");
$sth->execute($cardnumber);
} else {
- $env->{'apierror'} = "invalid borrower information passed to
getpatroninformation subroutine";
- return();
+ return undef;
}
my $borrower = $sth->fetchrow_hashref;
my $amount = checkaccount($env, $borrowernumber, $dbh);
@@ -364,13 +363,11 @@
=cut
-
sub getiteminformation {
# returns a hash of item information given either the itemnumber or the barcode
my ($itemnumber, $barcode) = @_;
my $dbh = C4::Context->dbh;
my $sth;
- my $env;
if ($itemnumber) {
$sth=$dbh->prepare("select * from biblio,items,biblioitems
where items.itemnumber=? and biblio.biblionumber=items.biblionumber and
biblioitems.biblioitemnumber = items.biblioitemnumber");
$sth->execute($itemnumber);
@@ -378,9 +375,7 @@
$sth=$dbh->prepare("select * from biblio,items,biblioitems
where items.barcode=? and biblio.biblionumber=items.biblionumber and
biblioitems.biblioitemnumber = items.biblioitemnumber");
$sth->execute($barcode);
} else {
- $env->{'apierror'}="getiteminformation() subroutine must be
called with either an itemnumber or a barcode";
- # Error condition.
- return();
+ return undef;
}
my $iteminformation=$sth->fetchrow_hashref;
$sth->finish;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/C4/Circulation Circ2.pm [rel_3_0],
Antoine Farnault <=