error("renaming of attachments is not allowed");
}
}
+
+ my $canremove;
+ IkiWiki::run_hooks(canremove => sub {
+ return if defined $canremove;
+ my $ret=shift->(page => $page, cgi => $q, session => $session);
+ if (defined $ret) {
+ if ($ret eq "") {
+ $canremove=1;
+ }
+ elsif (ref $ret eq 'CODE') {
+ $ret->();
+ $canremove=0;
+ }
+ elsif (defined $ret) {
+ error($ret);
+ $canremove=0;
+ }
+ }
+ });
}
sub formbuilder_setup (@) {
}
}
else {
- IkiWiki::showform($form, $buttons, $session, $q);
+ removal_confirm($q, $session, 0, $q->param("page"));
}
exit 0;