use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "remove", call => \&getsetup);
error("renaming of attachments is not allowed");
}
}
+
+ my $canremove;
+ IkiWiki::run_hooks(canremove => sub {
+ return if defined $canremove;
+ my $ret=shift->($page, $q, $session);
+ if (defined $ret) {
+ if ($ret eq "") {
+ $canremove=1;
+ }
+ elsif (ref $ret eq 'CODE') {
+ $ret->();
+ $canremove=0;
+ }
+ elsif (defined $ret) {
+ error($ret);
+ $canremove=0;
+ }
+ }
+ });
+ return $canremove;
}
sub formbuilder_setup (@) {