X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Fopac-tags_subject.pl;h=b083ef20d7d02557033c1158f04a10244d877506;hb=31c29fd31f557306233e6a2936148a5bb10b89a1;hp=3a7a3078cea38a1b7360006aea03ff135b2e5af2;hpb=e20270fec4f6d34f01050bea4c5765d5b3c4ed33;p=koha.git diff --git a/opac/opac-tags_subject.pl b/opac/opac-tags_subject.pl index 3a7a3078ce..b083ef20d7 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 @@ -24,15 +24,13 @@ TODO :: Description here =cut -use strict; -use warnings; +use Modern::Perl; use C4::Auth; use C4::Context; use C4::Output; use CGI qw ( -utf8 ); use C4::Biblio; -use C4::Koha; # use getitemtypeinfo my $query = new CGI; @@ -51,8 +49,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;