[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm

raeburn raeburn@source.lon-capa.org
Sat, 25 Jul 2009 06:55:32 -0000


raeburn		Sat Jul 25 06:55:32 2009 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  - Replace hardcoded path.
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.260 loncom/publisher/lonpublisher.pm:1.261
--- loncom/publisher/lonpublisher.pm:1.260	Thu May 28 17:08:38 2009
+++ loncom/publisher/lonpublisher.pm	Sat Jul 25 06:55:31 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.260 2009/05/28 17:08:38 bisitz Exp $
+# $Id: lonpublisher.pm,v 1.261 2009/07/25 06:55:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1641,7 +1641,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>");