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.9,1.9.2.1


From: MJ Ray
Subject: [Koha-cvs] CVS: koha/admin printers.pl,1.9,1.9.2.1
Date: Tue, 23 Dec 2003 09:55:56 -0800

Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv22608/admin

Modified Files:
      Tag: rel_2_0
        printers.pl 
Log Message:
DBI call fix for bug 662

Index: printers.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/printers.pl,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -C2 -r1.9 -r1.9.2.1
*** printers.pl 6 May 2003 14:55:39 -0000       1.9
--- printers.pl 23 Dec 2003 17:55:54 -0000      1.9.2.1
***************
*** 53,59 ****
        my @data=split(' ',$searchstring);
        my address@hidden;
!       my $query="Select printername,printqueue,printtype from printers where 
(printername like \"$data[0]%\") order by printername";
!       my $sth=$dbh->prepare($query);
!       $sth->execute;
        my @results;
        my $cnt=0;
--- 53,59 ----
        my @data=split(' ',$searchstring);
        my address@hidden;
!       my $query="";
!       my $sth=$dbh->prepare("Select printername,printqueue,printtype from 
printers where (printername like ?) order by printername");
!       $sth->execute("$data[0]%");
        my @results;
        my $cnt=0;
***************
*** 69,75 ****
  my $input = new CGI;
  my $searchfield=$input->param('searchfield');
! my $pkfield="printername";
! my $reqsel="select printername,printqueue,printtype from printers where 
$pkfield='$searchfield'";
! my $reqdel="delete from printers where $pkfield='$searchfield'";
  #my $branchcode=$input->param('branchcode');
  my $offset=$input->param('offset');
--- 69,75 ----
  my $input = new CGI;
  my $searchfield=$input->param('searchfield');
! my $pkfield="";
! my $reqsel="";
! my $reqdel="";
  #my $branchcode=$input->param('branchcode');
  my $offset=$input->param('offset');
***************
*** 103,108 ****
        if ($searchfield) {
                my $dbh = C4::Context->dbh;
!               my $sth=$dbh->prepare("select printername,printqueue,printtype 
from printers where printername='$searchfield'");
!               $sth->execute;
                $data=$sth->fetchrow_hashref;
                $sth->finish;
--- 103,108 ----
        if ($searchfield) {
                my $dbh = C4::Context->dbh;
!               my $sth=$dbh->prepare("select printername,printqueue,printtype 
from printers where printername=?");
!               $sth->execute($searchfield);
                $data=$sth->fetchrow_hashref;
                $sth->finish;
***************
*** 117,126 ****
        $template->param(add_validate => 1);
        my $dbh = C4::Context->dbh;
!       my $query = "replace printers (printername,printqueue,printtype) values 
(";
!       $query.= $dbh->quote($input->param('printername')).",";
!       $query.= $dbh->quote($input->param('printqueue')).",";
!       $query.= $dbh->quote($input->param('printtype')).")";
!       my $sth=$dbh->prepare($query);
!       $sth->execute;
        $sth->finish;
                                                                                
                        # END $OP eq ADD_VALIDATE
--- 117,122 ----
        $template->param(add_validate => 1);
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare("replace printers 
(printername,printqueue,printtype) values (?,?,?)");
!       
$sth->execute($input->param('printername'),$input->param('printqueue'),$input->param('printtype'));
        $sth->finish;
                                                                                
                        # END $OP eq ADD_VALIDATE
***************
*** 130,135 ****
        $template->param(delete_confirm => 1);
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare($reqsel);
!       $sth->execute;
        my $data=$sth->fetchrow_hashref;
        $sth->finish;
--- 126,131 ----
        $template->param(delete_confirm => 1);
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare("select printername,printqueue,printtype from 
printers where printername=");
!       $sth->execute($searchfield);
        my $data=$sth->fetchrow_hashref;
        $sth->finish;
***************
*** 144,149 ****
  
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare($reqdel);
!       $sth->execute;
        $sth->finish;
                                                                                
                        # END $OP eq DELETE_CONFIRMED
--- 140,145 ----
  
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare("delete from printers where printername=?");
!       $sth->execute($searchfield);
        $sth->finish;
                                                                                
                        # END $OP eq DELETE_CONFIRMED




reply via email to

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