koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/admin printers.pl,1.5,1.5.2.1


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/admin printers.pl,1.5,1.5.2.1
Date: Thu, 03 Oct 2002 19:35:08 -0700

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

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


Index: printers.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/printers.pl,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -r1.5 -r1.5.2.1
*** printers.pl 14 Aug 2002 18:12:53 -0000      1.5
--- printers.pl 4 Oct 2002 02:35:06 -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)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 ----
***************
*** 89,93 ****
        my $data;
        if ($searchfield) {
!               my $dbh = &C4Connect;
                my $sth=$dbh->prepare("select printername,printqueue,printtype 
from printers where printername='$searchfield'");
                $sth->execute;
--- 88,92 ----
        my $data;
        if ($searchfield) {
!               my $dbh = C4::Context->dbh;
                my $sth=$dbh->prepare("select printername,printqueue,printtype 
from printers where printername='$searchfield'");
                $sth->execute;
***************
*** 174,178 ****
  # called by add_form, used to insert/modify data in DB
  } elsif ($op eq 'add_validate') {
!       my $dbh=C4Connect;
        my $query = "replace printers (printername,printqueue,printtype) values 
(";
        $query.= $dbh->quote($input->param('printername')).",";
--- 173,177 ----
  # called by add_form, used to insert/modify data in DB
  } elsif ($op eq 'add_validate') {
!       my $dbh = C4::Context->dbh;
        my $query = "replace printers (printername,printqueue,printtype) values 
(";
        $query.= $dbh->quote($input->param('printername')).",";
***************
*** 190,194 ****
  # called by default form, used to confirm deletion of data in DB
  } elsif ($op eq 'delete_confirm') {
!       my $dbh = &C4Connect;
        my $sth=$dbh->prepare($reqsel);
        $sth->execute;
--- 189,193 ----
  # 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($reqsel);
        $sth->execute;
***************
*** 206,210 ****
  # called by delete_confirm, used to effectively confirm deletion of data in DB
  } elsif ($op eq 'delete_confirmed') {
!       my $dbh=C4Connect;
  #     my $searchfield=$input->param('branchcode');
        my $sth=$dbh->prepare($reqdel);
--- 205,209 ----
  # called by delete_confirm, used to effectively confirm deletion of data in DB
  } elsif ($op eq 'delete_confirmed') {
!       my $dbh = C4::Context->dbh;
  #     my $searchfield=$input->param('branchcode');
        my $sth=$dbh->prepare($reqdel);




reply via email to

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