=cut
my $input = new CGI;
+
+# if OpacTopissue is disabled, leave immediately
+if ( ! C4::Context->preference('OpacTopissue') ) {
+ print $input->redirect("/cgi-bin/koha/errors/404.pl");
+ exit;
+}
+
my $branches = GetBranches();
my $itemtypes = GetItemTypes();
GROUP BY biblio.biblionumber
HAVING tot >0
ORDER BY tot DESC
- LIMIT $limit
+ LIMIT ?
";
$template->param(ccodesearch => 1);
}else{
GROUP BY biblio.biblionumber
HAVING tot >0
ORDER BY tot DESC
- LIMIT $limit
+ LIMIT ?
";
$template->param(itemtypesearch => 1);
}
my $sth = $dbh->prepare($query);
-$sth->execute();
+$sth->execute($limit);
my @results;
while (my $line= $sth->fetchrow_hashref) {
push @results, $line;