version 1.67, 2005/04/07 06:56:24
|
version 1.69, 2005/05/30 16:56:46
|
Line 710 sub NewFile1 {
|
Line 710 sub NewFile1 {
|
##Informs User (name).(number).(extension) not allowed |
##Informs User (name).(number).(extension) not allowed |
if($newfilename =~ /\.(\d+)\.(\w+)$/){ |
if($newfilename =~ /\.(\d+)\.(\w+)$/){ |
$r->print('<font color="red">'.$newfilename. |
$r->print('<font color="red">'.$newfilename. |
' - '.&mt('Bad Filename').'<br />('.&mt('name').').('.&mt('number').').('.&mt('extension').')'. |
' - '.&mt('Bad Filename').'<br />('.&mt('name').').('.&mt('number').').('.&mt('extension').') '. |
|
' '.&mt('Not Allowed').'</font>'); |
|
return; |
|
} |
|
if($newfilename =~ /(\:\:\:|\&\&\&|\_\_\_)/){ |
|
$r->print('<font color="red">'.$newfilename. |
|
' - '.&mt('Bad Filename').'<br />('.&mt('Must not include').' '.$1.') '. |
' '.&mt('Not Allowed').'</font>'); |
' '.&mt('Not Allowed').'</font>'); |
return; |
return; |
} |
} |
Line 1111 sub phasetwo {
|
Line 1117 sub phasetwo {
|
$main=$2; # Filename. |
$main=$2; # Filename. |
} |
} |
if($main=~m:\.(\w+)$:){ # Fixes problems with filenames with no extensions |
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 |
$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. |
my $dest; # On success this is where we'll go. |
|
|