# - we delete the record having primkey=$primkey
use strict;
+#use warnings; FIXME - Bug 2505
use CGI;
use C4::Context;
use C4::Auth;
my $dbh=C4::Context->dbh;
my $sth=$dbh->prepare("select * from z3950servers where name=?");
$sth->execute($input->param('searchfield'));
+ my $checked = $input->param('checked') ? 1 : 0;
if ($sth->rows) {
$sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,syntax=?,encoding=? where name=?");
$sth->execute($input->param('host'),
$input->param('userid'),
$input->param('password'),
$input->param('searchfield'),
- $input->param('checked'),
+ $checked,
$input->param('rank'),
$input->param('syntax'),
$input->param('encoding'),
$template->param(else => 1);
my ($count,$results)=StringSearch($searchfield,'web');
my @loop;
- my $toggle = 0;
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
my $urlsearchfield=$results->[$i]{name};
checked => $results->[$i]{'checked'},
rank => $results->[$i]{'rank'},
syntax => $results->[$i]{'syntax'},
- encoding => $results->[$i]{'encoding'},
- toggle => $toggle);
+ encoding => $results->[$i]{'encoding'});
push @loop, \%row;
- if ( $toggle eq 0 )
- {
- $toggle = 1;
- }
- else
- {
- $toggle = 0;
- }
-
}
$template->param(loop => \@loop);
if ($offset>0) {