diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-07-26 03:12:57 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-07-26 03:12:57 +0000 |
commit | 3ea6d8a319bdedaaf014500abc7826f767dada43 (patch) | |
tree | 213fe942e10c558bdd6f9dc26a6881d431442c78 /doc/bugs | |
parent | 9583d6978a703ecca340ca39eaad1b7741efaee4 (diff) |
web commit by http://ethan.betacantrips.com/: fix
Diffstat (limited to 'doc/bugs')
-rw-r--r-- | doc/bugs/discussion_removal.mdwn | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/doc/bugs/discussion_removal.mdwn b/doc/bugs/discussion_removal.mdwn index 70bc2f5c0..9e08361a3 100644 --- a/doc/bugs/discussion_removal.mdwn +++ b/doc/bugs/discussion_removal.mdwn @@ -7,4 +7,27 @@ link to it in the action bar. Looks to me like loadindex is populating %destsources with information that the old discussion page exists, which isn't invalidated when ikiwiki discovers that the page is gone. This leaves dangling links whenever *any* -page is deleted, not just a discussion page. --Ethan
\ No newline at end of file +page is deleted, not just a discussion page. --Ethan + +Here's a patch that trawls through %destsources deleting pages when they +are found to be deleted. It's a little inelegant, but it's simple and it +works. --Ethan + +<pre> +diff -urX ignorepats ikiwiki/IkiWiki/Render.pm ikidev/IkiWiki/Render.pm +--- ikiwiki/IkiWiki/Render.pm 2007-07-25 15:58:24.501068000 -0700 ++++ ikidev/IkiWiki/Render.pm 2007-07-25 20:08:32.966449000 -0700 +@@ -320,6 +320,11 @@ + prune($config{destdir}."/".$_) + foreach @{$oldrenderedfiles{$page}}; + delete $pagesources{$page}; ++ foreach (keys %destsources){ ++ if ($destsources{$_} == $page) { ++ delete $destsources{$_}; ++ } ++ } + } + } + +</pre> + |