--- loncom/publisher/lonpubdir.pm 2007/11/02 19:24:44 1.105 +++ loncom/publisher/lonpubdir.pm 2010/02/11 21:49:19 1.114.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Directory Lister # -# $Id: lonpubdir.pm,v 1.105 2007/11/02 19:24:44 albertel Exp $ +# $Id: lonpubdir.pm,v 1.114.2.1 2010/02/11 21:49:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -62,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); @@ -74,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; } @@ -105,7 +105,7 @@ sub handler { my $numres = 0; # Start off the directory table. - $r->print('
'.&mt('Type').' | '. ''.&mt('Actions').' | '. @@ -156,7 +156,8 @@ sub getEffectiveUrl { # Replace the ~username of the URL with /home/username/public_html # so that we don't have to worry about ~ expansion internally. # - $fn=~s/^http\:\/\/[^\/]+\///; + $fn=~s/^https?\:\/\/[^\/]+\///; + $fn=~s/^\///; $fn=~s{~($LONCAPA::username_re)}{/home/$1/public_html}; @@ -197,7 +198,7 @@ sub startpage { my $formaction='/priv/'.$uname.$thisdisfn.'/'; $formaction=~s|/+|/|g; my $pagetitle .= &Apache::loncommon::help_open_menu('','',3,'Authoring'). - 'Construction Space: '. + ''.&mt('Construction Space').': '. '
---|