aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-10-15 19:33:52 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-10-15 19:33:52 +0000
commitb973ed82699903c23b3feeb5e73e1ebd6f587f43 (patch)
treeaf25dcd50842673244ced0b7d97ad01dcf10f13f /IkiWiki.pm
parent8544d52fe9e5d344bb0b5e70985aabc0e35b4920 (diff)
downloadikiwiki-b973ed82699903c23b3feeb5e73e1ebd6f587f43.tar
ikiwiki-b973ed82699903c23b3feeb5e73e1ebd6f587f43.tar.gz
* Add no_override parameter to hook().
* Add a shortcut plugin, inspired by Victor Moral's contributed shortcuts plugin, but featuring a more ikiwiki-ish syntax and with shortcuts that can be configured using a page in wiki.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index a39e317f5..7084e9627 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -641,6 +641,8 @@ sub hook (@) { # {{{
if (! exists $param{type} || ! ref $param{call} || ! exists $param{id}) {
error "hook requires type, call, and id parameters";
}
+
+ return if $param{no_override} && exists $hooks{$param{type}}{$param{id}};
$hooks{$param{type}}{$param{id}}=\%param;
} # }}}