--- loncom/publisher/lonpublisher.pm 2002/09/18 15:43:06 1.97 +++ loncom/publisher/lonpublisher.pm 2002/10/03 15:02:22 1.98 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.97 2002/09/18 15:43:06 www Exp $ +# $Id: lonpublisher.pm,v 1.98 2002/10/03 15:02:22 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -469,7 +469,8 @@ sub get_subscribed_hosts { while ($filename=readdir(DIR)) { if ($filename=~/$srcf\.(\w+)$/) { my $subhost=$1; - if ($subhost ne 'meta' && $subhost ne 'subscription') { + if (($subhost ne 'meta' && $subhost ne 'subscription') && + ($subhost ne $Apache::lonnet::perlvar{'lonHostID'})) { push(@subscribed,$subhost); } } @@ -480,7 +481,11 @@ sub get_subscribed_hosts { &Apache::lonnet::logthis("opened $target.subscription"); while (my $subline=<$sh>) { &Apache::lonnet::logthis("Trying $subline"); - if ($subline =~ /(^\w+):/) { push(@subscribed,$1); } else { + if ($subline =~ /(^\w+):/) { + if ($1 ne $Apache::lonnet::perlvar{'lonHostID'}) { + push(@subscribed,$1); + } + } else { &Apache::lonnet::logthis("No Match for $subline"); } } @@ -1302,9 +1307,13 @@ if (-e $target) { } opendir(DIR,$srcd); while ($filename=readdir(DIR)) { + if (-l $srcd.'/'.$filename) { + unlink($srcd.'/'.$filename); + } else { if ($filename=~/$srcf\.(\d+)\.$srct$/) { $maxversion=($1>$maxversion)?$1:$maxversion; } + } } closedir(DIR); $maxversion++;