[Koha-cvs] CVS: koha bookcount.pl,1.2,1.2.2.1
Andrew Arensburger
arensb at users.sourceforge.net
Fri Oct 4 03:43:03 CEST 2002
- Previous message: [Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/default/en opac-detail.tmpl,1.1,1.2 opac-main.tmpl,1.2,1.3 opac-reserve.tmpl,1.1,1.2 opac-search.tmpl,1.3,1.4 opac-searchresults.tmpl,1.5,1.6
- Next message: [Koha-cvs] CVS: koha charges.pl,1.2,1.2.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv8659
Modified Files:
Tag: arensb-context
bookcount.pl
Log Message:
Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
C4Connect.
Index: bookcount.pl
===================================================================
RCS file: /cvsroot/koha/koha/bookcount.pl,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -r1.2 -r1.2.2.1
*** bookcount.pl 14 Aug 2002 18:12:50 -0000 1.2
--- bookcount.pl 4 Oct 2002 01:43:01 -0000 1.2.2.1
***************
*** 24,27 ****
--- 24,28 ----
use strict;
use CGI;
+ use C4::Context;
use C4::Search;
use C4::Circulation::Circ2;
***************
*** 112,120 ****
# database includes
use DBI;
- use C4::Database;
sub itemdatanum {
my ($itemnumber)=@_;
! my $dbh=C4Connect;
my $itm = $dbh->quote("$itemnumber");
my $query = "select * from items where itemnumber=$itm";
--- 113,120 ----
# database includes
use DBI;
sub itemdatanum {
my ($itemnumber)=@_;
! my $dbh = C4::Context->dbh;
my $itm = $dbh->quote("$itemnumber");
my $query = "select * from items where itemnumber=$itm";
***************
*** 123,127 ****
my $data=$sth->fetchrow_hashref;
$sth->finish;
- $dbh->disconnect;
return($data);
}
--- 123,126 ----
***************
*** 129,133 ****
sub lastmove {
my ($itemnumber)=@_;
! my $dbh=C4Connect;
my $var1 = $dbh->quote($itemnumber);
my $sth =$dbh->prepare("select max(branchtransfers.datearrived) from branchtransfers where branchtransfers.itemnumber=$var1");
--- 128,132 ----
sub lastmove {
my ($itemnumber)=@_;
! my $dbh = C4::Context->dbh;
my $var1 = $dbh->quote($itemnumber);
my $sth =$dbh->prepare("select max(branchtransfers.datearrived) from branchtransfers where branchtransfers.itemnumber=$var1");
***************
*** 141,145 ****
return(0, "Item has no branch transfers record") if not $data;
$sth->finish;
- $dbh->disconnect;
return($data,"");
}
--- 140,143 ----
***************
*** 147,151 ****
sub issuessince {
my ($itemnumber, $date)=@_;
! my $dbh=C4Connect;
my $itm = $dbh->quote($itemnumber);
my $dat = $dbh->quote($date);
--- 145,149 ----
sub issuessince {
my ($itemnumber, $date)=@_;
! my $dbh = C4::Context->dbh;
my $itm = $dbh->quote($itemnumber);
my $dat = $dbh->quote($date);
***************
*** 154,158 ****
my $count=$sth->fetchrow_hashref;
$sth->finish;
- $dbh->disconnect;
return($count->{'count(*)'});
}
--- 152,155 ----
***************
*** 160,164 ****
sub issuesat {
my ($itemnumber, $brcd)=@_;
! my $dbh=C4Connect;
my $itm = $dbh->quote($itemnumber);
my $brc = $dbh->quote($brcd);
--- 157,161 ----
sub issuesat {
my ($itemnumber, $brcd)=@_;
! my $dbh = C4::Context->dbh;
my $itm = $dbh->quote($itemnumber);
my $brc = $dbh->quote($brcd);
***************
*** 168,172 ****
my ($count)=$sth->fetchrow_array;
$sth->finish;
- $dbh->disconnect;
return($count);
}
--- 165,168 ----
***************
*** 174,178 ****
sub lastseenat {
my ($itemnumber, $brcd)=@_;
! my $dbh=C4Connect;
my $itm = $dbh->quote($itemnumber);
my $brc = $dbh->quote($brcd);
--- 170,174 ----
sub lastseenat {
my ($itemnumber, $brcd)=@_;
! my $dbh = C4::Context->dbh;
my $itm = $dbh->quote($itemnumber);
my $brc = $dbh->quote($brcd);
***************
*** 187,191 ****
my ($date2)=$sth->fetchrow_array;
$sth->finish;
- $dbh->disconnect;
$date2 =~ s/-//g;
$date2 =~ s/://g;
--- 183,186 ----
- Previous message: [Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/default/en opac-detail.tmpl,1.1,1.2 opac-main.tmpl,1.2,1.3 opac-reserve.tmpl,1.1,1.2 opac-search.tmpl,1.3,1.4 opac-searchresults.tmpl,1.5,1.6
- Next message: [Koha-cvs] CVS: koha charges.pl,1.2,1.2.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Koha-cvs
mailing list