[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 13 Jan 2006 19:19:36 -0000
albertel Fri Jan 13 14:19:36 2006 EDT
Modified files:
/loncom/publisher lonpublisher.pm
Log:
- when publishing a directory it was possible that it didn't do the id number fixups because %addid wasn't initialized
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.204 loncom/publisher/lonpublisher.pm:1.205
--- loncom/publisher/lonpublisher.pm:1.204 Wed Jan 11 15:35:19 2006
+++ loncom/publisher/lonpublisher.pm Fri Jan 13 14:19:34 2006
@@ -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.205 2006/01/13 19:19:34 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -686,7 +686,9 @@
$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'}) &&
@@ -2006,30 +2008,26 @@
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.