--- loncom/publisher/lonpubdir.pm 2005/05/28 02:18:03 1.82 +++ loncom/publisher/lonpubdir.pm 2009/07/14 12:27:57 1.123 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Directory Lister # -# $Id: lonpubdir.pm,v 1.82 2005/05/28 02:18:03 www Exp $ +# $Id: lonpubdir.pm,v 1.123 2009/07/14 12:27:57 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,10 +36,12 @@ use Apache::Constants qw(:common :http : use Apache::loncacc; use Apache::loncommon(); use Apache::lonhtmlcommon(); +use Apache::londiff(); use Apache::lonlocal; use Apache::lonmsg; use Apache::lonmenu; use Apache::lonnet; +use LONCAPA; sub handler { @@ -60,7 +62,7 @@ sub handler { &Apache::loncacc::constructaccess( $fn,$r->dir_config('lonDefDomain')); unless (($uname) && ($udom)) { - $r->log_reason($uname.' at '.$udom. + $r->log_reason($uname.':'.$udom. ' trying to list directory '.$env{'form.filename'}. ' ('.$fn.') - not authorized', $r->filename); @@ -72,7 +74,7 @@ sub handler { $fn=~s/\/$//; unless ($fn) { - $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}. + $r->log_reason($env{'user.name'}.':'.$env{'user.domain'}. ' trying to list empty directory', $r->filename); return HTTP_NOT_FOUND; } @@ -103,15 +105,16 @@ sub handler { my $numres = 0; # Start off the directory table. - $r->print('
'.&mt('Type').' | '. - ''.&mt('Actions').' | '. - ''.&mt('Name').' | '. - ''.&mt('Title').' | '. - ''.&mt('Status').' | '. - ''.&mt('Last Modified'). - ' | '.&mt('Type').' | ' + .''.&mt('Actions').' | ' + .''.&mt('Name').' | ' + .''.&mt('Title').' | ' + .''.&mt('Status').' | ' + .''.&mt('Last Modified').' | ' + .&Apache::loncommon::end_data_table_header_row() + ); my $filename; my $dirptr=16384; # Mask indicating a directory in stat.cmode. @@ -137,7 +140,9 @@ sub handler { } closedir(DIR); - $r->print('
---|