--- loncom/publisher/lonpublisher.pm 2004/06/18 16:52:19 1.174 +++ loncom/publisher/lonpublisher.pm 2004/09/02 19:34:46 1.178 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.174 2004/06/18 16:52:19 www Exp $ +# $Id: lonpublisher.pm,v 1.178 2004/09/02 19:34:46 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -472,7 +472,8 @@ sub get_subscribed_hosts { while ($filename=readdir(DIR)) { if ($filename=~/\Q$srcf\E\.(\w+)$/) { my $subhost=$1; - if (($subhost ne 'meta' && $subhost ne 'subscription') && + if (($subhost ne 'meta' && $subhost ne 'subscription' && + $subhost ne 'tmp') && ($subhost ne $Apache::lonnet::perlvar{'lonHostID'})) { push(@subscribed,$subhost); } @@ -583,11 +584,11 @@ sub get_all_text_unbalanced { } elsif ($token->[0] eq 'E') { $result.=$token->[2]; } - if ($result =~ /(.*)\Q$tag\E(.*)/s) { + if ($result =~ /\Q$tag\E/s) { + ($result,my $redo)=$result =~ /(.*)\Q$tag\E(.*)/is; #&Apache::lonnet::logthis('Got a winner with leftovers ::'.$2); #&Apache::lonnet::logthis('Result is :'.$1); - $result=$1; - my $redo=$tag.$2; + $redo=$tag.$redo; push (@$pars,HTML::LCParser->new(\$redo)); $$pars[-1]->xml_mode('1'); last; @@ -929,7 +930,7 @@ sub publish { } } } - $outstring=~s/\n*(\<\/[^\>]+\>)\s*$/$allowstr\n$1\n/s; + $outstring=~s/\n*(\<\/[^\>]+\>[^<]*)$/$allowstr\n$1\n/s; # ------------------------------------------------------------- Write modified.