From b973ed82699903c23b3feeb5e73e1ebd6f587f43 Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 15 Oct 2006 19:33:52 +0000 Subject: * 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. --- IkiWiki.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'IkiWiki.pm') 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; } # }}} -- cgit v1.2.3