use constant MAX_FILE_DISPLAYNAME_LENGTH => 255;
use constant ARTICLE_CUSTOM_FIELDS_CFG => "article custom fields";
-our $VERSION = "1.054";
+our $VERSION = "1.055";
=head1 NAME
}
my $imagename = $filename;
$imagename .= ''; # force it into a string
- my $basename = '';
- $imagename =~ tr/ //d;
- $imagename =~ /([\w.-]+)$/ and $basename = $1;
+ (my $basename = $imagename) =~ tr/A-Za-z0-9_./-/cs;
- # for OSs with special text line endings
require BSE::ImageSize;
my ($width,$height, $type) = BSE::ImageSize::imgsize($fh);
use IO::File;
use File::Copy;
-our $VERSION = "1.001";
+our $VERSION = "1.002";
=head1 NAME
- DevHelp::FileUpload - tools to maintain a file upload directory
+DevHelp::FileUpload - tools to maintain a file upload directory
=head1 SYNOPSIS
sub make_img_filename {
my ($class, $imgdir, $name, $rmsg) = @_;
- my $basename = '';
- $name =~ /([\w.-]+)$/ and $basename = $1;
+ (my $basename = $name) =~ tr/A-Za-z0-9_./-/cs;
if (length $basename > 60) {
$basename = substr($basename, -60);