X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Fopac-topissues.pl;h=fbf0081a38361d4ca2eea0100345e278c9d9e3c0;hb=41397c855397aee9847943c2f124e0bdc8ba7eb7;hp=ac240df4bed05175a9abf8ecd88b973bf224d3c2;hpb=d58f2cfaf6a3951c1c224019ec911cc9ce387877;p=koha.git diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index ac240df4be..fbf0081a38 100755 --- a/opac/opac-topissues.pl +++ b/opac/opac-topissues.pl @@ -19,8 +19,7 @@ # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; @@ -29,7 +28,6 @@ use C4::Languages; use C4::Search; use C4::Output; use C4::Koha; -use C4::Branch; use C4::Circulation; use Date::Manip; @@ -49,9 +47,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 +83,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;