diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-01-07 16:35:16 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-07 16:35:16 -0500 |
commit | c34895364f10955f2acf1f8c70fda72b83132eb8 (patch) | |
tree | c85f74e23d319e7c3f5719117003b97f3be5875c | |
parent | c487b847e2053b13c4eea0ccfeecf5a41c396412 (diff) |
fixes
-rw-r--r-- | IkiWiki/CGI.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index a6695b3a5..ea75caf9c 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -57,7 +57,6 @@ sub check_canedit ($$$;$) { #{{{ my $nonfatal=shift; my $canedit; - my $callback; run_hooks(canedit => sub { return if defined $canedit; my $ret=shift->($page, $q, $session); @@ -66,12 +65,12 @@ sub check_canedit ($$$;$) { #{{{ $canedit=1; } elsif (ref $ret eq 'CODE') { + $ret->() unless $nonfatal; $canedit=0; - $callback->() unless $nonfatal; } elsif (defined $ret) { - $canedit=0; error($ret) unless $nonfatal; + $canedit=0; } } }); |