sipb-www
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3479809
)
fix transitioning of page state
author
Joey Hess
<joey@kodama.kitenet.net>
Fri, 21 Mar 2008 17:22:47 +0000
(13:22 -0400)
committer
Joey Hess
<joey@kodama.kitenet.net>
Fri, 21 Mar 2008 17:22:47 +0000
(13:22 -0400)
ikiwiki-transition
patch
|
blob
|
history
diff --git
a/ikiwiki-transition
b/ikiwiki-transition
index 0e2bd4e22020b909de8bf3098f563e3d7772f672..0177f98a9263917d6554d880fd150d5f1fe44d12 100755
(executable)
--- a/
ikiwiki-transition
+++ b/
ikiwiki-transition
@@
-94,6
+94,7
@@
else {
package IkiWiki;
package IkiWiki;
+# A slightly modified version of the old loadindex function.
sub oldloadindex {
%oldrenderedfiles=%pagectime=();
if (! $config{rebuild}) {
sub oldloadindex {
%oldrenderedfiles=%pagectime=();
if (! $config{rebuild}) {
@@
-131,5
+132,16
@@
sub oldloadindex {
$oldrenderedfiles{$page}=[@{$items{dest}}];
$pagectime{$page}=$items{ctime}[0];
}
$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);
}
return close($in);
}