summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-21 14:03:39 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-21 14:03:39 -0400
commitb1b5860b291645e212a9f9afd59d029fe0a035c6 (patch)
tree2370b4a375188a71537f43cad91212ec06e141d2 /IkiWiki
parent8cab4366d1eafa8c8e8ccb0d0d8166343bd9df49 (diff)
touchups
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/remove.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm
index 5bc59225c..396bff2e4 100644
--- a/IkiWiki/Plugin/remove.pm
+++ b/IkiWiki/Plugin/remove.pm
@@ -47,7 +47,7 @@ sub confirmation_form ($$) { #{{{
$f->field(name => "page", label => "Will remove:", size => 60,
validate => sub {
# Validate page by checking that the page exists, and that
- # the user is allowed to edit(/delete) it.
+ # the user is allowed to edit(/remove) it.
my $page=IkiWiki::titlepage(shift);
if (! exists $pagesources{$page}) {
$f->field(name => "page", message => gettext("page does not exist"));
@@ -97,13 +97,13 @@ sub sessioncgi ($$) { #{{{
my $session=shift;
my ($form, $buttons)=confirmation_form($q, $session);
IkiWiki::decode_form_utf8($form);
+
if ($form->submitted eq 'Cancel') {
# Load saved form state and return to edit form.
my $postremove=CGI->new($session->param("postremove"));
$session->clear("postremove");
IkiWiki::cgi_savesession($session);
IkiWiki::cgi($postremove, $session);
- exit 0;
}
elsif ($form->submitted eq 'Remove' && $form->validate) {
my $page=IkiWiki::titlepage($form->field("page"));
@@ -130,12 +130,12 @@ sub sessioncgi ($$) { #{{{
$parent="index";
}
IkiWiki::redirect($q, $config{url}."/".htmlpage($parent));
- exit 0;
}
else {
IkiWiki::showform($form, $buttons, $session, $q);
- exit 0;
}
+
+ exit 0;
}
}