--- loncom/publisher/lonpublisher.pm 2005/06/27 21:40:39 1.199
+++ loncom/publisher/lonpublisher.pm 2006/04/06 22:15:18 1.208
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.199 2005/06/27 21:40:39 www Exp $
+# $Id: lonpublisher.pm,v 1.208 2006/04/06 22:15:18 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -355,7 +355,8 @@ sub hiddenfield {
sub checkbox {
my ($name,$text)=@_;
- return "\n
".&mt($text);
+ return "\n
";
}
sub selectbox {
@@ -507,7 +508,6 @@ sub get_subscribed_hosts {
if ( $sh=Apache::File->new("$target.subscription") ) {
&Apache::lonnet::logthis("opened $target.subscription");
while (my $subline=<$sh>) {
- &Apache::lonnet::logthis("Trying $subline");
if ($subline =~ /(^\w+):/) {
if ($1 ne $Apache::lonnet::perlvar{'lonHostID'}) {
push(@subscribed,$1);
@@ -547,6 +547,7 @@ sub get_max_ids_indices {
my %duplicatedids;
my $parser=HTML::LCParser->new($content);
+ $parser->xml_mode(1);
my $token;
while ($token=$parser->get_token) {
if ($token->[0] eq 'S') {
@@ -676,6 +677,7 @@ sub fix_ids_and_indices {
$allow{$token->[2]->{'src'}}=1;
next;
}
+ if ($lctag eq 'base') { next; }
my %parms=%{$token->[2]};
$counter=$addid{$tag};
if (!$counter) { $counter=$addid{$lctag}; }
@@ -685,7 +687,9 @@ sub fix_ids_and_indices {
$parms{'id'}!~/^\s*$/) {
$maxid++;
$parms{'id'}=$maxid;
- print $logfile 'ID: '.$tag.':'.$maxid."\n";
+ print $logfile 'ID(new) : '.$tag.':'.$maxid."\n";
+ } else {
+ print $logfile 'ID(kept): '.$tag.':'.$parms{'id'}."\n";
}
} elsif ($counter eq 'index') {
unless (defined($parms{'index'}) &&
@@ -696,12 +700,14 @@ sub fix_ids_and_indices {
}
}
}
- foreach my $type ('src','href','background','bgimg') {
- foreach my $key (keys(%parms)) {
- if ($key =~ /^$type$/i) {
- $parms{$key}=&set_allow(\%allow,$logfile,
- $target,$tag,
- $parms{$key});
+ unless ($parms{'type'} eq 'zombie') {
+ foreach my $type ('src','href','background','bgimg') {
+ foreach my $key (keys(%parms)) {
+ if ($key =~ /^$type$/i) {
+ $parms{$key}=&set_allow(\%allow,$logfile,
+ $target,$tag,
+ $parms{$key});
+ }
}
}
}
@@ -1312,12 +1318,12 @@ END
# $intr_scrout.=&text_with_browse_field('Source Custom Distribution File','sourcerights',$metadatafields{'sourcerights'},'rights');
my $uctitle=&mt('Obsolete');
$intr_scrout.=
- "\n
$uctitle:". + "\n'. + $intr_scrout.='/ >
'. &text_with_browse_field('Suggested Replacement for Obsolete File', 'obsoletereplacement', $metadatafields{'obsoletereplacement'}); @@ -1779,7 +1785,7 @@ sub publishdirectory { &hiddenfield('filename',$env{'form.filename'}). &checkbox('pubrec','include subdirectories'). &checkbox('forcerepub','force republication of previously published files'). - &checkbox('forceobsolete','make file(s) obsolete'). + &checkbox('obsolete','make file(s) obsolete'). &checkbox('forceoverride','force directory level catalog information over existing'). '