[Koha-cvs] CVS: koha/admin aqbudget.pl,1.5,1.5.2.1
Andrew Arensburger
arensb at users.sourceforge.net
Fri Oct 4 04:33:51 CEST 2002
Update of /cvsroot/koha/koha/admin
In directory usw-pr-cvs1:/tmp/cvs-serv21052
Modified Files:
Tag: arensb-context
aqbudget.pl
Log Message:
Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
C4Connect.
Index: aqbudget.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/aqbudget.pl,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -r1.5 -r1.5.2.1
*** aqbudget.pl 14 Aug 2002 18:12:53 -0000 1.5
--- aqbudget.pl 4 Oct 2002 02:33:49 -0000 1.5.2.1
***************
*** 39,50 ****
use strict;
- use C4::Output;
use CGI;
use C4::Search;
- use C4::Database;
sub StringSearch {
my ($env,$searchstring,$type)=@_;
! my $dbh = &C4Connect;
$searchstring=~ s/\'/\\\'/g;
my @data=split(' ',$searchstring);
--- 39,50 ----
use strict;
use CGI;
+ use C4::Context;
+ use C4::Output;
use C4::Search;
sub StringSearch {
my ($env,$searchstring,$type)=@_;
! my $dbh = C4::Context->dbh;
$searchstring=~ s/\'/\\\'/g;
my @data=split(' ',$searchstring);
***************
*** 61,65 ****
# $sth->execute;
$sth->finish;
- $dbh->disconnect;
return ($cnt,\@results);
}
--- 61,64 ----
***************
*** 85,89 ****
my $data;
if ($bookfundid) {
! my $dbh = &C4Connect;
my $query="select aqbookfund.bookfundid,startdate,enddate,budgetamount,bookfundname from aqbudget,aqbookfund where aqbudget.bookfundid=aqbookfund.bookfundid and aqbookfund.bookfundid='$bookfundid'";
# print $query;
--- 84,88 ----
my $data;
if ($bookfundid) {
! my $dbh = C4::Context->dbh;
my $query="select aqbookfund.bookfundid,startdate,enddate,budgetamount,bookfundname from aqbudget,aqbookfund where aqbudget.bookfundid=aqbookfund.bookfundid and aqbookfund.bookfundid='$bookfundid'";
# print $query;
***************
*** 175,179 ****
# called by add_form, used to insert/modify data in DB
} elsif ($op eq 'add_validate') {
! my $dbh=C4Connect;
my $query = "replace aqbudget (bookfundid,startdate,enddate,budgetamount) values (";
$query.= $dbh->quote($input->param('bookfundid')).",";
--- 174,178 ----
# called by add_form, used to insert/modify data in DB
} elsif ($op eq 'add_validate') {
! my $dbh = C4::Context->dbh;
my $query = "replace aqbudget (bookfundid,startdate,enddate,budgetamount) values (";
$query.= $dbh->quote($input->param('bookfundid')).",";
***************
*** 192,196 ****
# called by default form, used to confirm deletion of data in DB
} elsif ($op eq 'delete_confirm') {
! my $dbh = &C4Connect;
# my $sth=$dbh->prepare("select count(*) as total from categoryitem where itemtype='$itemtype'");
# $sth->execute;
--- 191,195 ----
# called by default form, used to confirm deletion of data in DB
} elsif ($op eq 'delete_confirm') {
! my $dbh = C4::Context->dbh;
# my $sth=$dbh->prepare("select count(*) as total from categoryitem where itemtype='$itemtype'");
# $sth->execute;
***************
*** 218,222 ****
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
! my $dbh=C4Connect;
my $bookfundid=uc($input->param('bookfundid'));
my $query = "delete from aqbudget where bookfundid='$bookfundid'";
--- 217,221 ----
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
! my $dbh = C4::Context->dbh;
my $bookfundid=uc($input->param('bookfundid'));
my $query = "delete from aqbudget where bookfundid='$bookfundid'";
More information about the Koha-cvs
mailing list