--- loncom/publisher/lonpubdir.pm 2006/05/17 13:41:45 1.91
+++ loncom/publisher/lonpubdir.pm 2007/10/18 21:58:21 1.104
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.91 2006/05/17 13:41:45 www Exp $
+# $Id: lonpubdir.pm,v 1.104 2007/10/18 21:58:21 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -41,6 +41,7 @@ use Apache::lonlocal;
use Apache::lonmsg;
use Apache::lonmenu;
use Apache::lonnet;
+use LONCAPA;
sub handler {
@@ -105,13 +106,13 @@ sub handler {
# Start off the directory table.
$r->print('
Directory Contents:
');
- $r->print(''.
- ''.&mt('Type').' | '.
- ''.&mt('Actions').' | '.
- ''.&mt('Name').' | '.
- ''.&mt('Title').' | '.
- ''.&mt('Status').' | '.
- ''.&mt('Last Modified').
+ $r->print(''.
+ ''.&mt('Type').' | '.
+ ''.&mt('Actions').' | '.
+ ''.&mt('Name').' | '.
+ ''.&mt('Title').' | '.
+ ''.&mt('Status').' | '.
+ ''.&mt('Last Modified').
' | '."\n");
my $filename;
@@ -157,7 +158,7 @@ sub getEffectiveUrl {
#
$fn=~s/^http\:\/\/[^\/]+\///;
$fn=~s/^\///;
- $fn=~s/\~(\w+)/\/home\/$1\/public_html/;
+ $fn=~s{~($LONCAPA::username_re)}{/home/$1/public_html};
# Remove trailing / strings (?)
@@ -170,7 +171,7 @@ sub getEffectiveUrl {
#internal authentication, needs fixup.
$fn = $r->uri(); # non users do not get the full path request
# through SCRIPT_FILENAME
- $fn=~s|^/~(\w+)|/home/$1/public_html|;
+ $fn=~s{^/~($LONCAPA::username_re)}{/home/$1/public_html};
}
}
$fn=~s/\/+/\//g;
@@ -195,7 +196,7 @@ sub startpage {
my $formaction='/priv/'.$uname.$thisdisfn.'/';
$formaction=~s|/+|/|g;
- my $pagetitle .= &Apache::loncommon::help_open_menu('','','','',3,'Authoring').
+ my $pagetitle .= &Apache::loncommon::help_open_menu('','',3,'Authoring').
'Construction Space: '.
'
|