--- loncom/publisher/loncfile.pm 2005/04/07 06:56:24 1.67
+++ loncom/publisher/loncfile.pm 2005/05/30 16:56:46 1.69
@@ -9,7 +9,7 @@
# and displays a page showing the results of the action.
#
#
-# $Id: loncfile.pm,v 1.67 2005/04/07 06:56:24 albertel Exp $
+# $Id: loncfile.pm,v 1.69 2005/05/30 16:56:46 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -710,7 +710,13 @@ sub NewFile1 {
##Informs User (name).(number).(extension) not allowed
if($newfilename =~ /\.(\d+)\.(\w+)$/){
$r->print(''.$newfilename.
- ' - '.&mt('Bad Filename').'
('.&mt('name').').('.&mt('number').').('.&mt('extension').')'.
+ ' - '.&mt('Bad Filename').'
('.&mt('name').').('.&mt('number').').('.&mt('extension').') '.
+ ' '.&mt('Not Allowed').'');
+ return;
+ }
+ if($newfilename =~ /(\:\:\:|\&\&\&|\_\_\_)/){
+ $r->print(''.$newfilename.
+ ' - '.&mt('Bad Filename').'
('.&mt('Must not include').' '.$1.') '.
' '.&mt('Not Allowed').'');
return;
}
@@ -1111,8 +1117,8 @@ sub phasetwo {
$main=$2; # Filename.
}
if($main=~m:\.(\w+)$:){ # Fixes problems with filenames with no extensions
- $main=~s/\.\w+$//; #strip the extension
$suffix=$1; #This is the actually filename extension if it exists
+ $main=~s/\.\w+$//; #strip the extension
}
my $dest; # On success this is where we'll go.