View | Details | Raw Unified | Return to bug 35291
Collapse All | Expand All

(-)a/tools/upload-cover-image.pl (-2 / +6 lines)
Lines 38-43 resized, maintaining aspect ratio. Link Here
38
=cut
38
=cut
39
39
40
use Modern::Perl;
40
use Modern::Perl;
41
use Cwd;
41
42
42
use File::Temp;
43
use File::Temp;
43
use CGI qw ( -utf8 );
44
use CGI qw ( -utf8 );
Lines 187-193 if ($fileID) { Link Here
187
                            $filename =~ s/[\"\r\n]//g;
188
                            $filename =~ s/[\"\r\n]//g;
188
                            $filename =~ s/^\s+//;
189
                            $filename =~ s/^\s+//;
189
                            $filename =~ s/\s+$//;
190
                            $filename =~ s/\s+$//;
190
                            my $srcimage = GD::Image->new("$dir/$filename");
191
                            my $full_filename = Cwd::abs_path("$dir/$filename"); #Resolve any relative filepath references
192
                            my $srcimage;
193
                            if ( $full_filename =~ /^\Q$dir\E/ ){
194
                                $srcimage = GD::Image->new($full_filename);
195
                            }
191
                            my $biblio;
196
                            my $biblio;
192
                            my $item;
197
                            my $item;
193
                            if ( defined $srcimage ) {
198
                            if ( defined $srcimage ) {
194
- 

Return to bug 35291