--- loncom/publisher/lonpubdir.pm 2001/08/18 22:01:00 1.12 +++ loncom/publisher/lonpubdir.pm 2001/11/29 20:03:03 1.15 @@ -10,7 +10,7 @@ # 03/23 Guy Albertelli # 03/24,03/29 Gerd Kortemeyer) # -# 03/31,04/03,05/09,06/23,08/18 Gerd Kortemeyer +# 03/31,04/03,05/09,06/23,08/18,08/20 Gerd Kortemeyer package Apache::lonpubdir; @@ -101,8 +101,19 @@ sub handler { my $extension=''; if ($filename=~/\.(\w+)$/) { $extension=$1; } - if (($extension ne 'meta') && - (&Apache::lonnet::fileembstyle($extension))) { + if ($cmode&$dirptr) { + my $disfilename=$filename; + if ($filename eq '..') { + $disfilename='Parent Directory'; + } + unless ((($filename eq '..') && ($thisdisfn eq '')) || + ($filename eq '.')) { + $r->print(''.$disfilename. + ''.localtime($cmtime).'  ' + ); + } + } elsif (&Apache::lonnet::fileembstyle($extension) ne 'hdn') { my $status='Unpublished'; my $bgcol='#FFBBBB'; if (-e $resdir.'/'.$filename) { @@ -123,6 +134,8 @@ sub handler { '&versionone=priv" target=cat>Diffs'; } } + $status.='
Retrieve'; } $r->print(''.$filename. @@ -130,18 +143,8 @@ sub handler { ''. 'Publish'); - } elsif ($cmode&$dirptr) { - my $disfilename=$filename; - if ($filename eq '..') { - $disfilename='Parent Directory'; - } - unless ((($filename eq '..') && ($thisdisfn eq '')) || - ($filename eq '.')) { - $r->print(''.$disfilename. - ''.localtime($cmtime).'  ' - ); - } + } else { + # "hidden" extension and not a directory, so hide it away. } } closedir(DIR);