[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/admin categoryitem.pl,1.3,1.3.2.1
From: |
Andrew Arensburger |
Subject: |
[Koha-cvs] CVS: koha/admin categoryitem.pl,1.3,1.3.2.1 |
Date: |
Thu, 03 Oct 2002 19:34:28 -0700 |
Update of /cvsroot/koha/koha/admin
In directory usw-pr-cvs1:/tmp/cvs-serv21270
Modified Files:
Tag: arensb-context
categoryitem.pl
Log Message:
Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
C4Connect.
Index: categoryitem.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/categoryitem.pl,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -r1.3 -r1.3.2.1
*** categoryitem.pl 14 Aug 2002 18:12:53 -0000 1.3
--- categoryitem.pl 4 Oct 2002 02:34:26 -0000 1.3.2.1
***************
*** 39,50 ****
use strict;
- use C4::Output;
use CGI;
use C4::Search;
- use C4::Database;
sub StringSearch {
my ($env,$searchstring,$type)address@hidden;
! 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)address@hidden;
! my $dbh = C4::Context->dbh;
$searchstring=~ s/\'/\\\'/g;
my @data=split(' ',$searchstring);
***************
*** 61,65 ****
# $sth->execute;
$sth->finish;
- $dbh->disconnect;
return ($cnt,address@hidden);
}
--- 61,64 ----
***************
*** 82,86 ****
my $data;
if ($categorycode) {
! my $dbh = &C4Connect;
my $sth=$dbh->prepare("select
categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired
from categories where categorycode='$categorycode'");
$sth->execute;
--- 81,85 ----
my $data;
if ($categorycode) {
! my $dbh = C4::Context->dbh;
my $sth=$dbh->prepare("select
categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired
from categories where categorycode='$categorycode'");
$sth->execute;
***************
*** 180,184 ****
# called by add_form, used to insert/modify data in DB
} elsif ($op eq 'add_validate') {
! my $dbh=C4Connect;
my $query = "replace categories
(categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired)
values (";
$query.= $dbh->quote($input->param('categorycode')).",";
--- 179,183 ----
# called by add_form, used to insert/modify data in DB
} elsif ($op eq 'add_validate') {
! my $dbh = C4::Context->dbh;
my $query = "replace categories
(categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired)
values (";
$query.= $dbh->quote($input->param('categorycode')).",";
***************
*** 204,208 ****
# 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
categorycode='$categorycode'");
$sth->execute;
--- 203,207 ----
# 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
categorycode='$categorycode'");
$sth->execute;
***************
*** 238,242 ****
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
! my $dbh=C4Connect;
my $categorycode=uc($input->param('categorycode'));
my $query = "delete from categories where categorycode='$categorycode'";
--- 237,241 ----
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
! my $dbh = C4::Context->dbh;
my $categorycode=uc($input->param('categorycode'));
my $query = "delete from categories where categorycode='$categorycode'";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/admin categoryitem.pl,1.3,1.3.2.1,
Andrew Arensburger <=