[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /publisher lonpublisher.pm
raeburn
raeburn@source.lon-capa.org
Tue, 24 Nov 2009 00:59:48 -0000
raeburn Tue Nov 24 00:59:48 2009 EDT
Modified files: (Branch: version_2_8_X)
/loncom/publisher lonpublisher.pm
Log:
- Backport 1.261.
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.249.2.1 loncom/publisher/lonpublisher.pm:1.249.2.2
--- loncom/publisher/lonpublisher.pm:1.249.2.1 Tue Nov 24 00:57:11 2009
+++ loncom/publisher/lonpublisher.pm Tue Nov 24 00:59:48 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.249.2.1 2009/11/24 00:57:11 raeburn Exp $
+# $Id: lonpublisher.pm,v 1.249.2.2 2009/11/24 00:59:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1640,7 +1640,8 @@
my $srcf=$2;
my $srct=$3;
my $srcd=$1;
- unless ($srcd=~/^\/home\/httpd\/html\/res/) {
+ my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'};
+ unless ($srcd=~/^\Q$docroot\E\/res/) {
print $logfile "\nPANIC: Target dir is ".$srcd;
$r->print(
"<span class=\"LC_error\">".&mt('Invalid target directory, FAIL')."</span>");