--- loncom/publisher/lonpublisher.pm 2009/11/24 01:01:28 1.249.2.3 +++ loncom/publisher/lonpublisher.pm 2009/02/10 12:12:08 1.250 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.249.2.3 2009/11/24 01:01:28 raeburn Exp $ +# $Id: lonpublisher.pm,v 1.250 2009/02/10 12:12:08 schafran Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1640,8 +1640,7 @@ sub phasetwo { my $srcf=$2; my $srct=$3; my $srcd=$1; - my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'}; - unless ($srcd=~/^\Q$docroot\E\/res/) { + unless ($srcd=~/^\/home\/httpd\/html\/res/) { print $logfile "\nPANIC: Target dir is ".$srcd; $r->print( "".&mt('Invalid target directory, FAIL').""); @@ -1653,7 +1652,7 @@ sub phasetwo { unlink($srcd.'/'.$filename); unlink($srcd.'/'.$filename.'.meta'); } else { - if ($filename=~/^\Q$srcf\E\.(\d+)\.\Q$srct\E$/) { + if ($filename=~/\Q$srcf\E\.(\d+)\.\Q$srct\E$/) { $maxversion=($1>$maxversion)?$1:$maxversion; } } @@ -1742,8 +1741,7 @@ sub phasetwo { # ------------------------------------------------------------- Trigger updates push(@{$modified_urls},[$target,$source]); unless ($registered_cleanup) { - my $handlers = $r->get_handlers('PerlCleanupHandler'); - $r->set_handlers('PerlCleanupHandler' => [\¬ify,@{$handlers}]); + $r->register_cleanup(\¬ify); $registered_cleanup=1; } @@ -1880,7 +1878,7 @@ sub publishdirectory { &checkbox('pubrec','include subdirectories'). &checkbox('forcerepub','force republication of previously published files'). &checkbox('obsolete','make file(s) obsolete'). - &checkbox('forceoverride','force directory level catalog information over existing'). + &checkbox('forceoverride','force directory level metadata over existing'). '
'); $lock=0; } else {