bug 1368 - remove FOREIGN_KEY_CHECKS = 0 from installer
[koha_ffzg] / admin / z3950servers.pl
index 9baba6c..a02714b 100755 (executable)
 #      - we delete the record having primkey=$primkey
 
 use strict;
-use C4::Output;
 use CGI;
-use C4::Search;
-use C4::Database;
 use C4::Context;
-use HTML::Template;
 use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
 
 sub StringSearch  {
-       my ($env,$searchstring,$type)=@_;
+       my ($searchstring,$type)=@_;
        my $dbh = C4::Context->dbh;
        $searchstring=~ s/\'/\\\'/g;
        my @data=split(' ',$searchstring);
@@ -54,10 +50,9 @@ my $script_name="/cgi-bin/koha/admin/z3950servers.pl";
 
 my $pagesize=20;
 my $op = $input->param('op');
-$searchfield=~ s/\,//g;
 
 my ($template, $loggedinuser, $cookie) 
-    = get_template_and_user({template_name => "parameters/z3950servers.tmpl",
+    = get_template_and_user({template_name => "admin/z3950servers.tmpl",
                                query => $input,
                                type => "intranet",
                                authnotrequired => 0,
@@ -159,9 +154,7 @@ if ($op eq 'add_form') {
 ################## DEFAULT ##################################
 } else { # DEFAULT
        $template->param(else => 1);
-
-       my $env;
-       my ($count,$results)=StringSearch($env,$searchfield,'web');
+       my ($count,$results)=StringSearch($searchfield,'web');
        my @loop;
        my $toggle = 0;
        for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
@@ -200,5 +193,4 @@ if ($op eq 'add_form') {
                                 nextpage => $offset+$pagesize);
        }
 } #---- END $OP eq DEFAULT
-
 output_html_with_http_headers $input, $cookie, $template->output;