--- loncom/publisher/lonpubdir.pm 2003/10/18 17:17:12 1.43 +++ loncom/publisher/lonpubdir.pm 2003/12/05 14:26:25 1.47 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Directory Lister # -# $Id: lonpubdir.pm,v 1.43 2003/10/18 17:17:12 taceyjo1 Exp $ +# $Id: lonpubdir.pm,v 1.47 2003/12/05 14:26:25 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -113,7 +113,7 @@ sub handler { my $dirptr=16384; # Mask indicating a directory in stat.cmode. opendir(DIR,$fn); - my @files=sort(readdir(DIR)); + my @files=sort {uc($a) cmp uc($b)} (readdir(DIR)); foreach my $filename (@files) { my ($cdev,$cino,$cmode,$cnlink, $cuid,$cgid,$crdev,$csize, @@ -277,7 +277,7 @@ sub putdirectory { unless (( ($dirname eq '..') && ($reqfile eq '')) || ($dirname eq '.')) { $r->print('<tr bgcolor="#CCCCFF">'. - '<td>Go to ...</td>'. + '<td>'.&mt('Go to ...').'</td>'. '<td><a href="'.$here.'/'.$dirname.'/" target="_top">'. $disfilename.'</a></td>'. '<td> </td>'. @@ -295,7 +295,7 @@ sub putresource { $resdir, $targetdir, $linkdir, $cmtime) = @_; - my $status='Unpublished'; + my $status=&mt('Unpublished'); my $bgcolor='#FFCCCC'; my $title=' '; if (-e $resdir.'/'.$filename) { @@ -337,7 +337,8 @@ sub putresource { $editlink2=' (<a href="'.$linkdir.'/'.$filename.'?forceColoredit=1" target="_top">'.&mt('Edit').'</a>)'; } if ($filename=~/\.(zip|tar|bz2|gz|tar.gz|tar.bz2|tgz)$/) { - $editlink=' (<a href="'.$linkdir.'/'.$filename.'?decompress=1" target="_top">'.&mt('Decompress').'</a>)'; + $editlink=' (<a target="_parent" href="/adm/cfile?decompress=/~'. + $uname.$thisdisfn.'/'.$filename.'">'.&mt('Decompress').'</a>)'; } $r->print('<tr bgcolor="'.$bgcolor.'">'. '<td><a target="_parent" href="/adm/publish?filename=/~'.