version 1.100.2.2, 2009/08/28 14:32:26
|
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 856 sub NewFile1 {
|
Line 857 sub NewFile1 {
|
} |
} |
|
|
my @okexts = qw(xml html xhtml htm xhtm problem page sequence rights sty task 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 1070 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; |
} |
} |
Line 1447 function writeDone() {
|
Line 1448 function writeDone() {
|
$loaditem{'onload'} = "writeDone()"; |
$loaditem{'onload'} = "writeDone()"; |
} |
} |
|
|
|
# Breadcrumbs |
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
&Apache::lonhtmlcommon::add_breadcrumb({ |
|
'text' => 'Construction Space', |
|
'href' => &Apache::loncommon::authorspace(), |
|
}); |
|
&Apache::lonhtmlcommon::add_breadcrumb({ |
|
'text' => 'File Operation', |
|
'title' => 'Construction Space File Operation', |
|
'href' => '', |
|
}); |
|
|
$r->print(&Apache::loncommon::start_page('Construction Space File Operation', |
$r->print(&Apache::loncommon::start_page('Construction Space File Operation', |
$js, |
$js, |
{'add_entries' => \%loaditem,})); |
{'add_entries' => \%loaditem,}) |
|
.&Apache::lonhtmlcommon::breadcrumbs() |
|
.&Apache::loncommon::head_subbox( |
|
&Apache::loncommon::CSTR_pageheader()) |
|
); |
|
|
$r->print('<h3>'.&mt('Location').': '.&display($fn).'</h3>'); |
$r->print('<h3>'.&mt('Location').': '.&display($fn).'</h3>'); |
|
|
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |