[LON-CAPA-cvs] cvs: loncom /interface lonsource.pm
raeburn
raeburn at source.lon-capa.org
Sun Oct 30 21:16:59 EDT 2011
raeburn Mon Oct 31 01:16:59 2011 EDT
Modified files:
/loncom/interface lonsource.pm
Log:
- use lonDocRoot perlvar in place of static string: '/home/httpd/html'.
Index: loncom/interface/lonsource.pm
diff -u loncom/interface/lonsource.pm:1.26 loncom/interface/lonsource.pm:1.27
--- loncom/interface/lonsource.pm:1.26 Tue Oct 25 19:11:52 2011
+++ loncom/interface/lonsource.pm Mon Oct 31 01:16:59 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Source Code handler
#
-# $Id: lonsource.pm,v 1.26 2011/10/25 19:11:52 www Exp $
+# $Id: lonsource.pm,v 1.27 2011/10/31 01:16:59 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -90,7 +90,8 @@
my ($role,$author_name,$domain)=©_author();
# Construct path to copy and filter out any possibly nasty stuff
- my $path_to_new_file = '/home/httpd/html/priv/'.$domain.'/'.$author_name.'/'.$newpath.'/'.$listname;
+ my $path_to_new_file = $r->dir_config('lonDocRoot').
+ "/priv/$domain/$author_name/$newpath/$listname";
$path_to_new_file=~s/\.\.//g;
$path_to_new_file=~s/\~//g;
$path_to_new_file=~s/\/+/\//g;
@@ -166,7 +167,7 @@
#Figure out if we are author or co-author
my ($role,$author_name,$domain)=©_author();
- my $path = '/home/httpd/html/priv/'.$domain.'/'.$author_name.'/';
+ my $path = $r->dir_config('lonDocRoot')."/priv/$domain/$author_name/";
my @directories = split(/\//,$newpath);
foreach my $now_checking (@directories) {
More information about the LON-CAPA-cvs
mailing list