catalogue - exit after redirect in detail.pl and updateitem.pl
[koha_gimpoz] / catalogue / dictionary.pl
index 98d53df..6a767f3 100755 (executable)
@@ -20,7 +20,6 @@
 
 use strict;
 use C4::Output;
-use C4::Interface::CGI::Output;
 use C4::Auth;
 use CGI;
 use C4::Search;
@@ -70,8 +69,6 @@ my $type=$input->param('type');
 my $dbh = C4::Context->dbh;
 my ($template, $loggedinuser, $cookie);
 
-my $env;
-
 my $startfrom=$input->param('startfrom');
 $startfrom=0 if(!defined $startfrom);
 my $searchdesc;
@@ -113,7 +110,7 @@ if ($op eq "do_search") {
 
        $sth=$dbh->prepare($strsth);
        $sth->execute($value);
-       my $total;
+       $total=0;
        my @catresults;
        my $javalue;
        while (my ($value,$ctresults)=$sth->fetchrow) {
@@ -130,7 +127,7 @@ if ($op eq "do_search") {
        }
        
 
-       my $strsth="Select distinct authtypecode from marc_subfield_structure where (";
+       $strsth="Select distinct authtypecode from marc_subfield_structure where (";
        foreach my $listtags (@tags){
                my @taglist=split /,/,$listtags;
                foreach my $curtag (@taglist){
@@ -140,9 +137,9 @@ if ($op eq "do_search") {
        }
        
        $strsth=~s/ OR$/)/;
-       my $strsth = $strsth." and authtypecode is not NULL";
+       $strsth .= " and authtypecode is not NULL";
 #      warn $strsth;
-       my $sth=$dbh->prepare($strsth);
+       $sth=$dbh->prepare($strsth);
        $sth->execute;
        
        #
@@ -151,7 +148,7 @@ if ($op eq "do_search") {
        my @authresults;
        my $authnbresults;
        while ((my $authtypecode) = $sth->fetchrow) {
-               my ($curauthresults,$nbresults) = authoritysearch($dbh,[''],[''],[''],['contains'],
+               my ($curauthresults,$nbresults) = SearchAuthorities([''],[''],[''],['contains'],
                                                                                                                \@search,$startfrom*$resultsperpage, $resultsperpage,$authtypecode);
                if (defined(@$curauthresults)) {
                        for (my $i = 0; $i < @$curauthresults ;$i++) {
@@ -254,9 +251,6 @@ $template->param(search => $search[0],
                marclist =>$field,
                type=>$type,
                anindex => $input->param('index'),
-               intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-               intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-               IntranetNav => C4::Context->preference("IntranetNav"),
                );
 
 # Print the page