aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-10-19 20:12:37 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-10-19 20:12:37 -0400
commitfd9393ef8575ad4a8966ae7f5310aab688dedf48 (patch)
tree6854fa55eb8ce4c703c48da585ba372d0f17ab2e /IkiWiki
parent3bdc66d30045a7259a7a71173fc6ce85b17cfaf6 (diff)
downloadikiwiki-fd9393ef8575ad4a8966ae7f5310aab688dedf48.tar
ikiwiki-fd9393ef8575ad4a8966ae7f5310aab688dedf48.tar.gz
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.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/relativedate.pm3
1 files changed, 2 insertions, 1 deletions
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"></script>';
} #}}}
-sub IkiWiki::displaytime ($;$) { #{{{
+sub display ($;$) { #{{{
my $time=shift;
my $format=shift;