koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/admin authorised_values.pl,1.11,1.11.2.1


From: MJ Ray
Subject: [Koha-cvs] CVS: koha/admin authorised_values.pl,1.11,1.11.2.1
Date: Fri, 19 Dec 2003 04:53:56 -0800

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

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

Index: authorised_values.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/authorised_values.pl,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -C2 -r1.11 -r1.11.2.1
*** authorised_values.pl        21 Oct 2003 15:47:07 -0000      1.11
--- authorised_values.pl        19 Dec 2003 12:53:54 -0000      1.11.2.1
***************
*** 35,41 ****
        my @data=split(' ',$searchstring);
        my address@hidden;
!       my $query="Select id,category,authorised_value,lib from 
authorised_values where (category like \"$data[0]%\") order by 
category,authorised_value";
!       my $sth=$dbh->prepare($query);
!       $sth->execute;
        my @results;
        my $cnt=0;
--- 35,40 ----
        my @data=split(' ',$searchstring);
        my address@hidden;
!       my $sth=$dbh->prepare("Select id,category,authorised_value,lib from 
authorised_values where (category like ?) order by category,authorised_value");
!       $sth->execute("$data[0]%");
        my @results;
        my $cnt=0;
***************
*** 52,57 ****
  $searchfield=~ s/\,//g;
  my $id = $input->param('id');
- my $reqsel="select category,authorised_value,lib from authorised_values where 
id='$id'";
- my $reqdel="delete from authorised_values where id='$id'";
  my $offset=$input->param('offset');
  my $script_name="/cgi-bin/koha/admin/authorised_values.pl";
--- 51,54 ----
***************
*** 82,87 ****
        if ($id) {
                my $dbh = C4::Context->dbh;
!               my $sth=$dbh->prepare("select id,category,authorised_value,lib 
from authorised_values where id='$id'");
!               $sth->execute;
                $data=$sth->fetchrow_hashref;
                $sth->finish;
--- 79,84 ----
        if ($id) {
                my $dbh = C4::Context->dbh;
!               my $sth=$dbh->prepare("select id,category,authorised_value,lib 
from authorised_values where id=?");
!               $sth->execute($id);
                $data=$sth->fetchrow_hashref;
                $sth->finish;
***************
*** 122,127 ****
  } elsif ($op eq 'delete_confirm') {
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare($reqsel);
!       $sth->execute;
        my $data=$sth->fetchrow_hashref;
        $sth->finish;
--- 119,124 ----
  } elsif ($op eq 'delete_confirm') {
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare("select category,authorised_value,lib from 
authorised_values where id=?");
!       $sth->execute($id);
        my $data=$sth->fetchrow_hashref;
        $sth->finish;
***************
*** 136,141 ****
  } elsif ($op eq 'delete_confirmed') {
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare($reqdel);
!       $sth->execute;
        $sth->finish;
        print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; 
URL=authorised_values.pl?searchfield=$searchfield\"></html>";
--- 133,138 ----
  } elsif ($op eq 'delete_confirmed') {
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare("delete from authorised_values where id=?");
!       $sth->execute($id);
        $sth->finish;
        print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; 
URL=authorised_values.pl?searchfield=$searchfield\"></html>";




reply via email to

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