summaryrefslogtreecommitdiff
path: root/ikiwiki-transition
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-03-21 13:22:47 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-03-21 13:22:47 -0400
commit82ecf0aa9dbf42352401cbcab1fb19bfece45c02 (patch)
treead82f3a1ea17bcf36774bdf5bb68ad06593118d0 /ikiwiki-transition
parent3479809f96fa9c7a5d9f86c18c581f9a343a3aef (diff)
fix transitioning of page state
Diffstat (limited to 'ikiwiki-transition')
-rwxr-xr-xikiwiki-transition12
1 files changed, 12 insertions, 0 deletions
diff --git a/ikiwiki-transition b/ikiwiki-transition
index 0e2bd4e22..0177f98a9 100755
--- a/ikiwiki-transition
+++ b/ikiwiki-transition
@@ -94,6 +94,7 @@ else {
package IkiWiki;
+# A slightly modified version of the old loadindex function.
sub oldloadindex {
%oldrenderedfiles=%pagectime=();
if (! $config{rebuild}) {
@@ -131,5 +132,16 @@ sub oldloadindex {
$oldrenderedfiles{$page}=[@{$items{dest}}];
$pagectime{$page}=$items{ctime}[0];
}
+
+ # saveindex relies on %hooks being populated, else it won't save
+ # the page state owned by a given hook. But no plugins are loaded
+ # by this program, so populate %hooks with all hook ids that
+ # currently have page state.
+ foreach my $page (keys %pagemtime) {
+ foreach my $id (keys %{$pagestate{$page}}) {
+ $hooks{_dummy}{$id}=1;
+ }
+ }
+
return close($in);
}