[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm
raeburn
raeburn at source.lon-capa.org
Mon Nov 7 13:22:37 EST 2011
raeburn Mon Nov 7 18:22:37 2011 EDT
Modified files:
/loncom/interface lonmenu.pm
Log:
- use lonDocRoot perlvar in place of static string: '/home/httpd/html'.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.358 loncom/interface/lonmenu.pm:1.359
--- loncom/interface/lonmenu.pm:1.358 Mon Oct 31 22:46:09 2011
+++ loncom/interface/lonmenu.pm Mon Nov 7 18:22:37 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.358 2011/10/31 22:46:09 raeburn Exp $
+# $Id: lonmenu.pm,v 1.359 2011/11/07 18:22:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -334,7 +334,8 @@
and ( $env{'request.noversionuri'} eq ''
|| !defined($env{'request.noversionuri'})))
{
- ($escurl = $env{'request.filename'}) =~ s{^/home/httpd/html}{};
+ my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};
+ ($escurl = $env{'request.filename'}) =~ s{^\Q$londocroot\E}{};
$escurl = &escape($escurl);
}
$menu =~ s/\[url\]/$escurl/g;
More information about the LON-CAPA-cvs
mailing list