projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c924c76
)
redirect after removal
author
Joey Hess
<joey@kodama.kitenet.net>
Mon, 21 Jul 2008 17:53:34 +0000
(13:53 -0400)
committer
Joey Hess
<joey@kodama.kitenet.net>
Mon, 21 Jul 2008 17:53:34 +0000
(13:53 -0400)
IkiWiki/Plugin/remove.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/remove.pm
b/IkiWiki/Plugin/remove.pm
index 57c43cfdf4db1b033d19541b77d1893889e227fd..5bc59225c7016da38a26351883ab5908b7b26b85 100644
(file)
--- 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);