koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/admin aqbudget.pl,1.5,1.6


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/admin aqbudget.pl,1.5,1.6
Date: Sat, 05 Oct 2002 03:02:00 -0700

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

Modified Files:
        aqbudget.pl 
Log Message:
Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.


Index: aqbudget.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/aqbudget.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** aqbudget.pl 14 Aug 2002 18:12:53 -0000      1.5
--- aqbudget.pl 5 Oct 2002 10:01:58 -0000       1.6
***************
*** 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 $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'";
***************
*** 261,265 ****
                $results->[$i]{'budgetamount'},
                
mklink("$script_name?op=add_form&bookfundid=".$results->[$i]{'bookfundid'},'Edit'),
!               
mklink("$script_name?op=delete_confirm&bookfundid=".$results->[$i]{'bookfundid'},'Delete',''));
        }
        print mktableft;
--- 260,264 ----
                $results->[$i]{'budgetamount'},
                
mklink("$script_name?op=add_form&bookfundid=".$results->[$i]{'bookfundid'},'Edit'),
!               
mklink("$script_name?op=delete_confirm&bookfundid=".$results->[$i]{'bookfundid'},'Delete',''));
 # FIXME - Too many arguments. Drop the 3d one?
        }
        print mktableft;




reply via email to

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