X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=rotating_collections%2FrotatingCollections.pl;h=acf4586568de3a0196ab10cc93374393eea2ce98;hb=ecc6b8b61532afdfaed7436a76d32369b48ba306;hp=52ee5ee460bb3fc72d6c5ad2a8610c391a28af24;hpb=481f620455d40f93a3cb37136ef2c3964497751e;p=koha.git diff --git a/rotating_collections/rotatingCollections.pl b/rotating_collections/rotatingCollections.pl index 52ee5ee460..acf4586568 100755 --- a/rotating_collections/rotatingCollections.pl +++ b/rotating_collections/rotatingCollections.pl @@ -2,25 +2,23 @@ # 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., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . # -use strict; -#use warnings; FIXME - Bug 2505 -require Exporter; +use Modern::Perl; -use CGI; +use CGI qw ( -utf8 ); use C4::Output; use C4::Auth; @@ -28,25 +26,24 @@ use C4::Context; use C4::RotatingCollections; my $query = new CGI; -my ($template, $loggedinuser, $cookie) - = get_template_and_user({template_name => "rotating_collections/rotatingCollections.tmpl", - query => $query, - type => "intranet", - authnotrequired => 0, - flagsrequired => {parameters => 1}, - debug => 1, - }); + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "rotating_collections/rotatingCollections.tt", + query => $query, + type => "intranet", + authnotrequired => 0, + flagsrequired => { tools => 'rotating_collections' }, + debug => 1, + } +); my $branchcode = $query->cookie('branch'); my $collections = GetCollections(); $template->param( - intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), - intranetstylesheet => C4::Context->preference("intranetstylesheet"), - IntranetNav => C4::Context->preference("IntranetNav"), - - collectionsLoop => $collections, - ); - + collectionsLoop => $collections, +); + output_html_with_http_headers $query, $cookie, $template->output;