version 1.101, 2009/05/28 17:08:38
|
version 1.104, 2010/11/27 23:20:46
|
Line 363 sub cleanDest {
|
Line 363 sub cleanDest {
|
if (! -d "$newpath") { |
if (! -d "$newpath") { |
$request->print('<p><span class="LC_warning">' |
$request->print('<p><span class="LC_warning">' |
.&mt("You have requested to create file in directory [_1] which doesn't exist. The requested directory path has been removed from the requested file name." |
.&mt("You have requested to create file in directory [_1] which doesn't exist. The requested directory path has been removed from the requested file name." |
,'<span class="LC_filename">'.&display($newpath).'</span>') |
,&display($newpath)) |
.'</span></p>'); |
.'</span></p>'); |
$dest=~s|.*/||; |
$dest=~s|.*/||; |
} |
} |
} |
} |
if ($dest =~ /\.(\d+)\.(\w+)$/){ |
if ($dest =~ /\.(\d+)\.(\w+)$/){ |
$request->print('<p><span class="LC_warning">' |
$request->print('<p><span class="LC_warning">' |
.&mt('Bad filename [_1]','<span class="LC_filename">'.&display($dest).'</span>') |
.&mt('Bad filename [_1]',&display($dest)) |
.'<br />' |
.'<br />' |
.&mt('[_1](name).(number).(extension)[_2] not allowed.','<tt>','</tt>') |
.&mt('[_1](name).(number).(extension)[_2] not allowed.','<tt>','</tt>') |
.'<br />' |
.'<br />' |
Line 552 sub Rename1 {
|
Line 552 sub Rename1 {
|
$request->print('<input type="hidden" name="newfilename" value="' |
$request->print('<input type="hidden" name="newfilename" value="' |
.$newfilename.'" />' |
.$newfilename.'" />' |
.'<p>' |
.'<p>' |
.&mt($action.' [_1] to [_2]?' |
.&mt($action.' [_1] to [_2]?', |
,&display($fn),&display($newfilename)) |
&display($fn), |
|
&display($newfilename)) |
.'</p>' |
.'</p>' |
); |
); |
&CloseForm1($request, $fn); |
&CloseForm1($request, $fn); |
Line 563 sub Rename1 {
|
Line 564 sub Rename1 {
|
} |
} |
} else { |
} else { |
$request->print('<p class="LC_error">' |
$request->print('<p class="LC_error">' |
.&mt('No such file: [_1]' |
.&mt('No such file: [_1]', |
,'<span class="LC_filename">'.&display($fn).'</span>') |
&display($fn)) |
.'</p></form>' |
.'</p></form>' |
); |
); |
return; |
return; |
Line 625 sub Delete1 {
|
Line 626 sub Delete1 {
|
} |
} |
} |
} |
$request->print('<p>' |
$request->print('<p>' |
.&mt('Delete [_1]?' |
.&mt('Delete [_1]?', |
,'<span class="LC_filename">'.&display($fn).'</span>') |
&display($fn)) |
.'</p>' |
.'</p>' |
); |
); |
&CloseForm1($request, $fn); |
&CloseForm1($request, $fn); |
} else { |
} else { |
$request->print('<p class="LC_error">' |
$request->print('<p class="LC_error">' |
.&mt('No such file: [_1]' |
.&mt('No such file: [_1]', |
,'<span class="LC_filename">'.&display($fn).'</span>') |
&display($fn)) |
.'</p></form>' |
.'</p></form>' |
); |
); |
} |
} |
Line 689 sub Copy1 {
|
Line 690 sub Copy1 {
|
$request->print('<br /><a href="'.&url($fn).'">'.&mt('Cancel').'</a>'); |
$request->print('<br /><a href="'.&url($fn).'">'.&mt('Cancel').'</a>'); |
return; |
return; |
} |
} |
$request->print('<input type="hidden" name="newfilename" value="' |
$request->print( |
.$newfilename.'" />' |
'<input type="hidden" name="newfilename"' |
.'<p>' |
.' value="'.$newfilename.'" />' |
.&mt('Copy [_1] to [_2]?' |
.'<p>' |
,'<span class="LC_filename">'.&display($fn).'</span>' |
.&mt('Copy [_1] to [_2]?', |
,'<span class="LC_filename">'.&display($newfilename).'</span>') |
&display($fn), |
.'</p>' |
&display($newfilename)) |
|
.'</p>' |
); |
); |
&CloseForm1($request, $fn); |
&CloseForm1($request, $fn); |
} else { |
} else { |
$request->print('<p class="LC_error">' |
$request->print('<p class="LC_error">' |
.&mt('No such file: [_1]' |
.&mt('No such file: [_1]', |
,'<span class="LC_filename">'.&display($fn).'</span>') |
&display($fn)) |
.'</p></form>' |
.'</p></form>' |
); |
); |
} |
} |
Line 754 sub NewDir1 {
|
Line 756 sub NewDir1 {
|
if ($type eq 'error') { |
if ($type eq 'error') { |
$request->print('</form>'); |
$request->print('</form>'); |
} else { |
} else { |
if ($mode eq 'testbank') { |
if (($mode eq 'testbank') || ($mode eq 'imsimport')) { |
$request->print('<input type="hidden" name="callingmode" value="testbank" />'); |
$request->print('<input type="hidden" name="callingmode" value="'.$mode.'" />'."\n". |
} elsif ($mode eq 'imsimport') { |
'<input type="hidden" name="inhibitmenu" value="yes" />'); |
$request->print('<input type="hidden" name="callingmode" value="imsimport" />'); |
|
} |
} |
$request->print('<input type="hidden" name="newfilename" value="' |
$request->print('<input type="hidden" name="newfilename" value="' |
.$newfilename.'" />' |
.$newfilename.'" />' |
.'<p>' |
.'<p>' |
.&mt('Make new directory [_1]?' |
.&mt('Make new directory [_1]?', |
,'<span class="LC_filename">'.&display($newfilename).'</span>') |
&display($newfilename)) |
.'</p>' |
.'</p>' |
); |
); |
&CloseForm1($request, $fn); |
&CloseForm1($request, $fn); |
Line 776 sub Decompress1 {
|
Line 777 sub Decompress1 {
|
if( -e $fn) { |
if( -e $fn) { |
$request->print('<input type="hidden" name="newfilename" value="'.$fn.'" />'); |
$request->print('<input type="hidden" name="newfilename" value="'.$fn.'" />'); |
$request->print('<p>' |
$request->print('<p>' |
.&mt('Decompress [_1]?' |
.&mt('Decompress [_1]?', |
,'<span class="LC_filename">'.&display($fn).'</span>') |
&display($fn)) |
.'</p>' |
.'</p>' |
); |
); |
&CloseForm1($request, $fn); |
&CloseForm1($request, $fn); |
} else { |
} else { |
$request->print('<p class="LC_error">' |
$request->print('<p class="LC_error">' |
.&mt('No such file: [_1]' |
.&mt('No such file: [_1]', |
,'<span class="LC_filename">'.&display($fn).'</span>') |
&display($fn)) |
.'</p></form>' |
.'</p></form>' |
); |
); |
} |
} |
Line 855 sub NewFile1 {
|
Line 856 sub NewFile1 {
|
$extension = $1; |
$extension = $1; |
} |
} |
|
|
my @okexts = qw(xml html xhtml htm xhtm problem page sequence rights sty library js css txt); |
my @okexts = qw(xml html xhtml htm xhtm problem page sequence rights sty task library js css txt); |
if (($extension eq '') || (!grep(/^\Q$extension\E/,@okexts))) { |
if (($extension eq '') || (!grep(/^\Q$extension\E/,@okexts))) { |
my $validexts = '.'.join(', .',@okexts); |
my $validexts = '.'.join(', .',@okexts); |
$request->print('<p class="LC_warning">'. |
$request->print('<p class="LC_warning">'. |
Line 1069 sub Rename2 {
|
Line 1070 sub Rename2 {
|
unlink $tmp2; |
unlink $tmp2; |
} |
} |
} else { |
} else { |
$request->print('<p>' |
$request->print( |
.&mt('No such file: [_1]' |
'<p>' |
,'<span class="LC_filename">'.&display($oldfile).'</span>') |
.&mt('No such file: [_1]', |
.'</p></form>' |
&display($oldfile)) |
|
.'</p></form>' |
); |
); |
return 0; |
return 0; |
} |
} |