--- loncom/publisher/lonpublisher.pm 2006/12/06 22:22:39 1.215 +++ loncom/publisher/lonpublisher.pm 2007/01/26 22:16:33 1.218 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.215 2006/12/06 22:22:39 albertel Exp $ +# $Id: lonpublisher.pm,v 1.218 2007/01/26 22:16:33 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -471,7 +471,7 @@ sub set_allow { ($newurl !~ /^\#/)) { $$allow{&absoluteurl($newurl,$target)}=1; } - return $return_url + return $return_url; } ######################################### @@ -495,7 +495,7 @@ sub get_subscribed_hosts { my $srcf=$2; opendir(DIR,$1); while ($filename=readdir(DIR)) { - if ($filename=~/\Q$srcf\E\.(\w+)$/) { + if ($filename=~/\Q$srcf\E\.($match_lonid)$/) { my $subhost=$1; if (($subhost ne 'meta' && $subhost ne 'subscription' && $subhost ne 'tmp') && @@ -507,18 +507,13 @@ sub get_subscribed_hosts { closedir(DIR); my $sh; if ( $sh=Apache::File->new("$target.subscription") ) { - &Apache::lonnet::logthis("opened $target.subscription"); while (my $subline=<$sh>) { - if ($subline =~ /(^\w+):/) { + if ($subline =~ /^($match_lonid):/) { if ($1 ne $Apache::lonnet::perlvar{'lonHostID'}) { push(@subscribed,$1); } - } else { - &Apache::lonnet::logthis("No Match for $subline"); } } - } else { - &Apache::lonnet::logthis("Unable to open $target.subscription"); } return @subscribed; } @@ -719,6 +714,7 @@ sub fix_ids_and_indices { ($lctag eq 'image')) { my $next_token=$parser[-1]->get_token(); if ($next_token->[0] eq 'T') { + $next_token->[1] =~ s/[\n\r\f]+//g; $next_token->[1]=&set_allow(\%allow,$logfile, $target,$tag, $next_token->[1]);