version 1.156, 2014/06/23 03:22:39
|
version 1.157, 2014/06/23 17:02:49
|
Line 88 sub handler {
|
Line 88 sub handler {
|
my %bombs=&Apache::lonmsg::all_url_author_res_msg($uname,$udom); |
my %bombs=&Apache::lonmsg::all_url_author_res_msg($uname,$udom); |
|
|
&startpage($r, $uname, $udom, $thisdisfn); # Put out the start of page. |
&startpage($r, $uname, $udom, $thisdisfn); # Put out the start of page. |
|
|
|
if (!-d $fn) { |
|
if (-e $fn) { |
|
$r->print('<p class="LC_info">'.&mt('Requested item is a file not a directory.').'</p>'); |
|
} else { |
|
$r->print('<p class="LC_info">'.&mt('The requested subdirectory does not exist.').'</p>'); |
|
} |
|
$r->print(&Apache::loncommon::end_page()); |
|
return OK; |
|
} |
|
my @files; |
|
if (opendir(DIR,$fn)) { |
|
@files = readdir(DIR); |
|
closedir(DIR); |
|
} else { |
|
$r->print('<p class="LC_error">'.&mt('Could not open directory.').'</p>'); |
|
$r->print(&Apache::loncommon::end_page()); |
|
return OK; |
|
} |
|
|
&dircontrols($r,$uname,$udom,$thisdisfn); # Put out actions for directory, |
&dircontrols($r,$uname,$udom,$thisdisfn); # Put out actions for directory, |
# browse/upload + new file page. |
# browse/upload + new file page. |
&resourceactions($r,$uname,$udom,$thisdisfn); # Put out form used for printing/deletion etc. |
&resourceactions($r,$uname,$udom,$thisdisfn); # Put out form used for printing/deletion etc. |
Line 106 sub handler {
|
Line 126 sub handler {
|
my $sortby = $env{'form.sortby'}; |
my $sortby = $env{'form.sortby'}; |
my $sortorder = $env{'form.sortorder'}; |
my $sortorder = $env{'form.sortorder'}; |
|
|
opendir(DIR,$fn); |
if ((@files == 0) && ($thisdisfn =~ m{^/$match_domain/$match_username/priv})) { |
my @files = readdir(DIR); |
if ($thisdisfn =~ m{^/$match_domain/$match_username/priv$}) { |
closedir(DIR); |
$r->print('<p class="LC_info">'.&mt('This Authoring Space is currently empty.').'</p>'); |
|
} else { |
if ((@files == 0) && ($thisdisfn =~ m{^/$match_domain/$match_username})) { |
$r->print('<p class="LC_info">'.&mt('This subdirectory is currently empty.').'</p>'); |
$r->print('<p class="LC_info">'.&mt('This Authoring Space is currently empty.').'</p>'); |
} |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |