Bug 25898: Prohibit indirect object notation
[srvgit] / opac / opac-shelves.pl
index e2ac9aa..0bcd273 100755 (executable)
@@ -41,7 +41,7 @@ use Koha::RecordProcessor;
 
 use constant ANYONE => 2;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $template_name = $query->param('rss') ? "opac-shelves-rss.tt" : "opac-shelves.tt";
 
@@ -433,4 +433,5 @@ $template->param(
     listsview => 1,
 );
 
-output_html_with_http_headers $query, $cookie, $template->output;
+my $content_type = $query->param('rss')? 'rss' : 'html';
+output_with_http_headers $query, $cookie, $template->output, $content_type;