--- loncom/publisher/lonpubdir.pm 2001/05/09 17:38:12 1.7 +++ loncom/publisher/lonpubdir.pm 2001/08/20 20:13:40 1.14 @@ -10,7 +10,7 @@ # 03/23 Guy Albertelli # 03/24,03/29 Gerd Kortemeyer) # -# 03/31,04/03,05/09 Gerd Kortemeyer +# 03/31,04/03,05/09,06/23,08/18,08/20 Gerd Kortemeyer package Apache::lonpubdir; @@ -19,6 +19,7 @@ use Apache::File; use File::Copy; use Apache::Constants qw(:common :http :methods); use Apache::loncacc; +use Apache::lonnet; sub handler { @@ -38,9 +39,10 @@ sub handler { my $uname; my $udom; - unless (($uname,$udom)= + ($uname,$udom)= &Apache::loncacc::constructaccess( - $fn,$r->dir_config('lonDefDomain'))) { + $fn,$r->dir_config('lonDefDomain')); + unless (($uname) && ($udom)) { $r->log_reason($uname.' at '.$udom. ' trying to publish file '.$ENV{'form.filename'}. ' ('.$fn.') - not authorized', @@ -84,19 +86,23 @@ sub handler { my $linkdir='/~'.$uname.$thisdisfn; $r->print('
Filename | Modified | Status | |
---|---|---|---|
Filename | Modified | Status | |
'.$filename. - ' | '.localtime($cmtime).' | '.$status.' | '.localtime($cmtime).' | '.$status.' | '. + ''. + 'Publish | '); } elsif ($cmode&$dirptr) { my $disfilename=$filename; if ($filename eq '..') { @@ -130,8 +141,12 @@ sub handler { ($filename eq '.')) { $r->print('
'.$disfilename. - ' | '.localtime($cmtime).' | '.localtime($cmtime).' | ' + ); } + } else { + #no extension that we know of and not a directory + #just hide it away } } closedir(DIR); |