return undef;
}
-sub canrename ($$@) {
- my ($cgi, $session) = (shift, shift);
+sub canrename (@) {
my %params = @_;
+ my $session = $params{session};
if (istranslation($params{src})) {
my $masterpage = masterpage($params{src});
my $canrename;
IkiWiki::run_hooks(canrename => sub {
return if defined $canrename;
- my $ret=shift->($q, $session, src => $src, srcfile => $srcfile,
- dest => $dest, destfile => $destfile);
+ my $ret=shift->(cgi => $q, session => $session,
+ src => $src, srcfile => $srcfile,
+ dest => $dest, destfile => $destfile);
if (defined $ret) {
if ($ret eq "") {
$canrename=1;
debug("skeleton plugin running in canremove");
}
-sub canrename ($$$) {
- my $page=shift;
- my $cgi=shift;
- my $session=shift;
+sub canrename (@) {
+ my %params=@_;
debug("skeleton plugin running in canrename");
}
This hook can be used to implement arbitrary access methods to control when
a page can be renamed using the web interface (commits from revision control
bypass it). It works exactly like the `canedit` and `canremove` hook,
-but is passed:
-* a CGI object
-* a session object
-* the named parameters `src`, `srcfile`, `dest` and `destfile`.
+but is passed the named parameters `cgi` (a CGI object), `session` (a
+session object), `src`, `srcfile`, `dest` and `destfile`.
### checkcontent