version 1.100, 2009/05/26 18:01:39
|
version 1.103, 2009/12/02 09:53:02
|
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 762 sub NewDir1 {
|
Line 764 sub NewDir1 {
|
$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 778 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 857 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 1071 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; |
} |
} |
Line 1450 function writeDone() {
|
Line 1453 function writeDone() {
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::add_breadcrumb({ |
&Apache::lonhtmlcommon::add_breadcrumb({ |
'text' => 'Construction Space', |
'text' => 'Construction Space', |
'href' => '', # FIXME Add link to /priv/[user] |
'href' => &Apache::loncommon::authorspace(), |
}); |
}); |
&Apache::lonhtmlcommon::add_breadcrumb({ |
&Apache::lonhtmlcommon::add_breadcrumb({ |
'text' => 'File Operation', |
'text' => 'File Operation', |