X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Fopac-tags_subject.pl;h=e5e182b6853689db42ca9aa8126f26324edbf454;hb=a6f8b23035a49110c759b5dc91656411cdb209c3;hp=a19f406db9dbc3ef01c3b3006b618607d4287922;hpb=2a3f7c141798121a75fc9ee670af0fdde431d9c2;p=koha.git diff --git a/opac/opac-tags_subject.pl b/opac/opac-tags_subject.pl index a19f406db9..e5e182b685 100755 --- a/opac/opac-tags_subject.pl +++ b/opac/opac-tags_subject.pl @@ -4,18 +4,18 @@ # # This file is part of Koha. # -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . =head1 opac-tags_subject.pl @@ -30,9 +30,8 @@ use warnings; use C4::Auth; use C4::Context; use C4::Output; -use CGI; +use CGI qw ( -utf8 ); use C4::Biblio; -use C4::Koha; # use getitemtypeinfo my $query = new CGI; @@ -41,7 +40,7 @@ my $dbh = C4::Context->dbh; # open template my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "opac-tags_subject.tmpl", + template_name => "opac-tags_subject.tt", query => $query, type => "opac", authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ), @@ -51,8 +50,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $number = $query->param('number') || 100; -my $sth = $dbh->prepare("SELECT entry,weight FROM tags ORDER BY weight DESC LIMIT $number"); -$sth->execute; +my $sth = $dbh->prepare("SELECT entry,weight FROM tags ORDER BY weight DESC LIMIT ?"); +$sth->execute($number); my %result; my $max=0;