X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Fopac-image.pl;h=7a94e81d52aeff5855412c4c73480ed2c54ada6e;hb=1885e6a2146dfab4784e3d9560161d5f097cfcae;hp=ba554c7befe1a05831c711a8f97efcea57907d2f;hpb=068e5be6395088793aeab66d67c36c2b9da2c5d9;p=koha.git diff --git a/opac/opac-image.pl b/opac/opac-image.pl index ba554c7bef..7a94e81d52 100755 --- a/opac/opac-image.pl +++ b/opac/opac-image.pl @@ -7,26 +7,25 @@ # # 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 . # # # -use strict; -use warnings; +use Modern::Perl; -use CGI; +use CGI qw ( -utf8 ); use C4::Context; use C4::Images; @@ -64,7 +63,7 @@ if ( C4::Context->preference("OPACLocalCoverImages") ) { $imagenumber = $data->param('imagenumber'); } elsif ( defined $data->param('biblionumber') ) { - my @imagenumbers = ListImagesForBiblio( $data->param('biblionumber') ); + my @imagenumbers = ListImagesForBiblio( scalar $data->param('biblionumber') ); if (@imagenumbers) { $imagenumber = $imagenumbers[0]; } @@ -92,8 +91,7 @@ if ( C4::Context->preference("OPACLocalCoverImages") ) { } print $data->header( -type => $mimetype, - -'Cache-Control' => 'no-store', - -expires => 'now', + -expires => '+30m', -Content_Length => length($image) ), $image;