Merge branch 'master' of git@github.com:plainblack/webgui

This commit is contained in:
khenn 2010-08-10 21:35:43 -05:00
commit da2b55d484
4 changed files with 18 additions and 2 deletions

View file

@ -232,6 +232,11 @@ sub load {
croak "Could not load $module because $moduleError{$module}";
}
# Sanitize
if ( $module !~ m{^\w+(?:::\w+)*$} ) {
croak "Invalid module name: $module";
}
# Try to load the module
my $modulePath = $module . ".pm";
$modulePath =~ s{::|'}{/}g;

View file

@ -315,7 +315,7 @@ sub addFileFromFilesystem {
return undef;
}
my $filename = (File::Spec->splitpath( $pathToFile ))[2];
if (isIn($self->getFileExtension($filename), qw(pl perl sh cgi php asp))) {
if (isIn($self->getFileExtension($filename), qw(pl perl sh cgi php asp pm))) {
$filename =~ s/\./\_/g;
$filename .= ".txt";
}