--- loncom/publisher/lonpublisher.pm 2006/01/11 20:35:19 1.204
+++ loncom/publisher/lonpublisher.pm 2006/01/24 22:09:36 1.207
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.204 2006/01/11 20:35:19 albertel Exp $
+# $Id: lonpublisher.pm,v 1.207 2006/01/24 22:09:36 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -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') {
@@ -686,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'}) &&
@@ -1782,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').
'
');
} else {
@@ -2006,30 +2009,26 @@ sub handler {
return HTTP_NOT_FOUND;
}
- unless ($env{'form.phase'} eq 'two') {
-
# -------------------------------- File is there and owned, init lookup tables.
- %addid=();
-
- {
- my $fh=Apache::File->new($r->dir_config('lonTabDir').'/addid.tab');
- while (<$fh>=~/(\w+)\s+(\w+)/) {
- $addid{$1}=$2;
- }
+ %addid=();
+
+ {
+ my $fh=Apache::File->new($r->dir_config('lonTabDir').'/addid.tab');
+ while (<$fh>=~/(\w+)\s+(\w+)/) {
+ $addid{$1}=$2;
}
+ }
- %nokey=();
+ %nokey=();
- {
- my $fh=Apache::File->new($r->dir_config('lonIncludes').'/un_keyword.tab');
- while (<$fh>) {
- my $word=$_;
- chomp($word);
- $nokey{$word}=1;
- }
+ {
+ my $fh=Apache::File->new($r->dir_config('lonIncludes').'/un_keyword.tab');
+ while (<$fh>) {
+ my $word=$_;
+ chomp($word);
+ $nokey{$word}=1;
}
-
}
# ---------------------------------------------------------- Start page output.