[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/admin z3950servers.pl,1.8,1.8.2.1
From: |
MJ Ray |
Subject: |
[Koha-cvs] CVS: koha/admin z3950servers.pl,1.8,1.8.2.1 |
Date: |
Tue, 06 Jan 2004 10:57:26 -0800 |
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv4834/admin
Modified Files:
Tag: rel_2_0
z3950servers.pl
Log Message:
DBI call fix for bug 662
Index: z3950servers.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/z3950servers.pl,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -r1.8 -r1.8.2.1
*** z3950servers.pl 6 May 2003 14:55:41 -0000 1.8
--- z3950servers.pl 6 Jan 2004 18:57:24 -0000 1.8.2.1
***************
*** 36,58 ****
my @data=split(' ',$searchstring);
my address@hidden;
! my $query="Select
host,port,db,userid,password,name,id,checked,rank,syntax from z3950servers
where (name like \"$data[0]\%\") order by rank,name";
! my $sth=$dbh->prepare($query);
! $sth->execute;
my @results;
- my $cnt=0;
while (my $data=$sth->fetchrow_hashref) {
push(@results,$data);
- $cnt ++;
}
# $sth->execute;
$sth->finish;
$dbh->disconnect;
! return ($cnt,address@hidden);
}
my $input = new CGI;
my $searchfield=$input->param('searchfield');
- my $reqsel="select host,port,db,userid,password,name,id,checked,rank,syntax
from z3950servers where (name = '$searchfield') order by rank,name";
- my $reqdel="delete from z3950servers where name='$searchfield'";
my $offset=$input->param('offset');
my $script_name="/cgi-bin/koha/admin/z3950servers.pl";
--- 36,53 ----
my @data=split(' ',$searchstring);
my address@hidden;
! my $sth=$dbh->prepare("Select
host,port,db,userid,password,name,id,checked,rank,syntax from z3950servers
where (name like ?) order by rank,name");
! $sth->execute("$data[0]\%");
my @results;
while (my $data=$sth->fetchrow_hashref) {
push(@results,$data);
}
# $sth->execute;
$sth->finish;
$dbh->disconnect;
! return (scalar(@results),address@hidden);
}
my $input = new CGI;
my $searchfield=$input->param('searchfield');
my $offset=$input->param('offset');
my $script_name="/cgi-bin/koha/admin/z3950servers.pl";
***************
*** 84,89 ****
if ($searchfield) {
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("select
host,port,db,userid,password,name,id,checked,rank,syntax from z3950servers
where (name = '$searchfield') order by rank,name");
! $sth->execute;
$data=$sth->fetchrow_hashref;
$sth->finish;
--- 79,84 ----
if ($searchfield) {
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("select
host,port,db,userid,password,name,id,checked,rank,syntax from z3950servers
where (name = ?) order by rank,name");
! $sth->execute($searchfield);
$data=$sth->fetchrow_hashref;
$sth->finish;
***************
*** 139,144 ****
my $dbh = C4::Context->dbh;
! my $sth2=$dbh->prepare($reqsel);
! $sth2->execute;
my $data=$sth2->fetchrow_hashref;
$sth2->finish;
--- 134,139 ----
my $dbh = C4::Context->dbh;
! my $sth2=$dbh->prepare("select
host,port,db,userid,password,name,id,checked,rank,syntax from z3950servers
where (name = ?) order by rank,name");
! $sth2->execute($searchfield);
my $data=$sth2->fetchrow_hashref;
$sth2->finish;
***************
*** 158,163 ****
$template->param(delete_confirmed => 1);
my $dbh=C4::Context->dbh;
! my $sth=$dbh->prepare($reqdel);
! $sth->execute;
$sth->finish;
# END $OP eq DELETE_CONFIRMED
--- 153,158 ----
$template->param(delete_confirmed => 1);
my $dbh=C4::Context->dbh;
! my $sth=$dbh->prepare("delete from z3950servers where name=?");
! $sth->execute($searchfield);
$sth->finish;
# END $OP eq DELETE_CONFIRMED
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/admin z3950servers.pl,1.8,1.8.2.1,
MJ Ray <=
- Prev by Date:
[Koha-cvs] CVS: koha/opac opac-account.pl,1.7,1.7.2.1 opac-detail.pl,1.9,1.9.2.1 opac-new.pl,1.1,1.1.2.1 opac-readingrecord.pl,1.5,1.5.2.1 opac-reserve.pl,1.19,1.19.2.1 opac-search.pl,1.9,1.9.2.1 opac-searchresults.pl,1.14,1.14.2.1 opac-userdetails.pl,1.6,1.6.2.1 opac-user.pl,1.11.2.1,1.11.2.2 opac-userupdate.pl,1.10,1.10.2.1
- Next by Date:
[Koha-cvs] CVS: koha/admin categorie.pl,1.13,1.13.2.1
- Previous by thread:
[Koha-cvs] CVS: koha/opac opac-account.pl,1.7,1.7.2.1 opac-detail.pl,1.9,1.9.2.1 opac-new.pl,1.1,1.1.2.1 opac-readingrecord.pl,1.5,1.5.2.1 opac-reserve.pl,1.19,1.19.2.1 opac-search.pl,1.9,1.9.2.1 opac-searchresults.pl,1.14,1.14.2.1 opac-userdetails.pl,1.6,1.6.2.1 opac-user.pl,1.11.2.1,1.11.2.2 opac-userupdate.pl,1.10,1.10.2.1
- Next by thread:
[Koha-cvs] CVS: koha/admin categorie.pl,1.13,1.13.2.1
- Index(es):