Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes
[koha.git] / opac / opac-topissues.pl
index ac240df..c3a7530 100755 (executable)
@@ -29,7 +29,6 @@ use C4::Languages;
 use C4::Search;
 use C4::Output;
 use C4::Koha;
-use C4::Branch;
 use C4::Circulation;
 use Date::Manip;
 
@@ -49,9 +48,6 @@ if ( ! C4::Context->preference('OpacTopissue') ) {
     exit;
 }
 
-my $branches = GetBranches();
-my $itemtypes = GetItemTypes();
-
 my ($template, $borrowernumber, $cookie) = get_template_and_user(
     {
         template_name   => 'opac-topissues.tt',
@@ -88,18 +84,16 @@ foreach my $type (@advanced_search_types) {
         $type = 'itemtype';
     }
     $params->{$type} = $input->param($type);
-    $template->param('selected_' . $type => $input->param($type));
+    $template->param('selected_' . $type => scalar $input->param($type));
 }
 
 my @results = GetTopIssues($params);
 
 $template->param(
     limit => $limit,
-    branch => $branches->{$branch}->{branchname},
+    branch => $branch,
     timeLimit => $timeLimit,
     results => \@results,
 );
 
-$template->param(branchloop => GetBranchesLoop($branch));
-
 output_html_with_http_headers $input, $cookie, $template->output;