version 1.80, 2006/12/20 22:41:08
|
version 1.81, 2007/03/30 20:37:31
|
Line 749 sub NewFile1 {
|
Line 749 sub NewFile1 {
|
return; |
return; |
} |
} |
if ($newfilename !~ /\Q.$extension\E$/) { |
if ($newfilename !~ /\Q.$extension\E$/) { |
if ($newfilename =~ m|^[^\.]*\.([^\.]+)$|) { |
if ($newfilename =~ m|/[^/.]*\.(?:[^/.]+)$|) { |
#already has an extension strip it and add in expected one |
#already has an extension strip it and add in expected one |
$newfilename =~ s|.([^\.]+)$||; |
$newfilename =~ s|(/[^./])\.(?:[^.]+)$|$1|; |
} |
} |
$newfilename.=".$extension"; |
$newfilename.=".$extension"; |
} |
} |
} |
} |
my $result=&exists($user,$domain,$newfilename); |
my $result=&exists($user,$domain,$newfilename); |
if($result) { |
if($result) { |
$request->print('<font color="red">'.$result.'</font></form>'); |
$request->print('<span class="LC_error">'.$result.'</span></form>'); |
} else { |
} else { |
$request->print('<p>'.&mt('Make new file').' '.&display($newfilename).'?</p>'); |
$request->print('<p>'.&mt('Make new file').' '.&display($newfilename).'?</p>'); |
$request->print('</form>'); |
$request->print('</form>'); |