From fd9393ef8575ad4a8966ae7f5310aab688dedf48 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Oct 2008 20:12:37 -0400 Subject: add displaytime hook Need to use a hook because an exported function cannot be reliably overridden. The replacement verstion was actually only affecting plugins loaded after it. formattime doesn't need a hook, since there's no reason to export it. --- IkiWiki/Plugin/relativedate.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index 0c9426dda..d9d8f7776 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -12,6 +12,7 @@ sub import { #{{{ add_underlay("javascript"); hook(type => "getsetup", id => "relativedate", call => \&getsetup); hook(type => "format", id => "relativedate", call => \&format); + hook(type => "displaytime", id => "relativedate", call => \&display); } # }}} sub getsetup () { #{{{ @@ -42,7 +43,7 @@ sub include_javascript ($;$) { #{{{ '" type="text/javascript" charset="utf-8">'; } #}}} -sub IkiWiki::displaytime ($;$) { #{{{ +sub display ($;$) { #{{{ my $time=shift; my $format=shift; -- cgit v1.2.3