diff options
-rw-r--r-- | IkiWiki/Plugin/remove.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index 57c43cfdf..5bc59225c 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -123,6 +123,14 @@ sub sessioncgi ($$) { #{{{ IkiWiki::prune("$config{srcdir}/$file"); IkiWiki::refresh(); IkiWiki::saveindex(); + + # Redirect to parent of the page. + my $parent=IkiWiki::dirname($page); + if (! exists $pagesources{$parent}) { + $parent="index"; + } + IkiWiki::redirect($q, $config{url}."/".htmlpage($parent)); + exit 0; } else { IkiWiki::showform($form, $buttons, $session, $q); |