--- loncom/publisher/lonpublisher.pm 2009/11/24 00:57:11 1.249.2.1 +++ loncom/publisher/lonpublisher.pm 2009/11/24 01:01:28 1.249.2.3 @@ -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.3 2009/11/24 01:01:28 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1640,7 +1640,8 @@ sub phasetwo { 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( "".&mt('Invalid target directory, FAIL').""); @@ -1741,7 +1742,8 @@ sub phasetwo { # ------------------------------------------------------------- Trigger updates push(@{$modified_urls},[$target,$source]); unless ($registered_cleanup) { - $r->register_cleanup(\¬ify); + my $handlers = $r->get_handlers('PerlCleanupHandler'); + $r->set_handlers('PerlCleanupHandler' => [\¬ify,@{$handlers}]); $registered_cleanup=1; }