}
my %deleted;
- if (ref $pagestate{index}{autoindex}{deleted}) {
- %deleted=%{$pagestate{index}{autoindex}{deleted}};
+ if (ref $wikistate{autoindex}{deleted}) {
+ %deleted=%{$wikistate{autoindex}{deleted}};
+ }
+ elsif (ref $pagestate{index}{autoindex}{deleted}) {
+ # compatability code
+ %deleted=%{$pagestate{index}{autoindex}{deleted}};
+ delete $pagestate{index}{autoindex};
+ }
+
+ if (keys %deleted) {
foreach my $dir (keys %deleted) {
# remove deleted page state if the deleted page is re-added,
# or if all its subpages are deleted
delete $deleted{$dir};
}
}
- $pagestate{index}{autoindex}{deleted}=\%deleted;
+ $wikistate{autoindex}{deleted}=\%deleted;
}
my @needed;
# This page must have just been deleted, so
# don't re-add it. And remember it was
# deleted.
- if (! ref $pagestate{index}{autoindex}{deleted}) {
- $pagestate{index}{autoindex}{deleted}={};
+ if (! ref $wikistate{autoindex}{deleted}) {
+ $wikistate{autoindex}{deleted}={};
}
- ${$pagestate{index}{autoindex}{deleted}}{$dir}=1;
+ ${$wikistate{autoindex}{deleted}}{$dir}=1;
}
else {
push @needed, $dir;
an iffy thing.
* Use above to fix up timestamps on docwiki, as well as ensure that
timestamps on basewiki files shipped in the deb are sane.
+ * autoindex: Switch to using %wikistate instead of abusing
+ $pagestate{index}.
-- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400
>>>>>> Aha! Having looked at [[plugins/write]] again, it turns out that what this
>>>>>> feature should really use is `%wikistate`, I think? :-) --[[smcv]]
+>>>>>>> Ah, indeed, that came after I wrote autoindex. I've fixed autoindex to
+>>>>>>> use it. --[[Joey]]
+
>>>>> Ok, now I know what you mean. --[[David_Riebenbauer]]
>>> * `autoindex` forgets that a page was deleted when that page is