[LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm
raeburn
raeburn at source.lon-capa.org
Sun Oct 30 21:20:06 EDT 2011
raeburn Mon Oct 31 01:20:06 2011 EDT
Modified files:
/loncom/interface lonhelper.pm
Log:
- use lonDocRoot perlvar in place of static string: '/home/httpd/html'.
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.184 loncom/interface/lonhelper.pm:1.185
--- loncom/interface/lonhelper.pm:1.184 Tue Oct 25 22:27:11 2011
+++ loncom/interface/lonhelper.pm Mon Oct 31 01:20:05 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.184 2011/10/25 22:27:11 www Exp $
+# $Id: lonhelper.pm,v 1.185 2011/10/31 01:20:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2975,7 +2975,8 @@
# If the subdirectory is in local CSTR space
my $metadir;
- if ($subdir =~ m|^/home/httpd/html/priv/[^/]+/[^/]+/(.*)$|) {
+ my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};
+ if ($subdir =~ m{^\Q$londocroot/priv/\E[^/]+/[^/]+/(.*)$}) {
my $innerpath=$1;
my ($user,$domain)=
&Apache::loncacc::constructaccess($subdir);
@@ -3086,7 +3087,7 @@
}
my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'};
my $subdirpart = $constructionSpaceDir;
- $subdirpart =~ s/^\/home\/httpd\/html\/priv\/\Q$udom\E\/\Q$uname\E//;
+ $subdirpart =~ s{^\Q$docroot/priv/$udom/$uname\E}{};
my $resdir = $docroot . '/res/' . $udom . '/' . $uname .
$subdirpart;
More information about the LON-CAPA-cvs
mailing list