koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/admin aqbookfund.pl,1.4,1.4.2.1


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/admin aqbookfund.pl,1.4,1.4.2.1
Date: Thu, 03 Oct 2002 19:33:41 -0700

Update of /cvsroot/koha/koha/admin
In directory usw-pr-cvs1:/tmp/cvs-serv21016

Modified Files:
      Tag: arensb-context
        aqbookfund.pl 
Log Message:
Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
C4Connect.


Index: aqbookfund.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/aqbookfund.pl,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** aqbookfund.pl       14 Aug 2002 18:12:53 -0000      1.4
--- aqbookfund.pl       4 Oct 2002 02:33:39 -0000       1.4.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 ----
***************
*** 85,89 ****
        my $data;
        if ($bookfundid) {
!               my $dbh = &C4Connect;
                my $sth=$dbh->prepare("select 
bookfundid,bookfundname,bookfundgroup from aqbookfund where 
bookfundid='$bookfundid'");
                $sth->execute;
--- 84,88 ----
        my $data;
        if ($bookfundid) {
!               my $dbh = C4::Context->dbh;
                my $sth=$dbh->prepare("select 
bookfundid,bookfundname,bookfundgroup from aqbookfund where 
bookfundid='$bookfundid'");
                $sth->execute;
***************
*** 171,175 ****
  # called by add_form, used to insert/modify data in DB
  } elsif ($op eq 'add_validate') {
!       my $dbh=C4Connect;
        my $query = "replace aqbookfund (bookfundid,bookfundname,bookfundgroup) 
values (";
        $query.= $dbh->quote($input->param('bookfundid')).",";
--- 170,174 ----
  # called by add_form, used to insert/modify data in DB
  } elsif ($op eq 'add_validate') {
!       my $dbh = C4::Context->dbh;
        my $query = "replace aqbookfund (bookfundid,bookfundname,bookfundgroup) 
values (";
        $query.= $dbh->quote($input->param('bookfundid')).",";
***************
*** 187,191 ****
  # 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;
--- 186,190 ----
  # 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;
***************
*** 212,216 ****
  # 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 aqbookfund where bookfundid='$bookfundid'";
--- 211,215 ----
  # 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 aqbookfund where bookfundid='$bookfundid'";




reply via email to

[Prev in Thread] Current Thread [Next in Thread]