aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-14 20:04:02 -0400
committerJoey Hess <joey@kitenet.net>2010-05-14 20:04:02 -0400
commit5a4c95cc352d6895c11542245981c62a5c003370 (patch)
treeff0fef8712951354ba105608829398aaa182cd20 /IkiWiki.pm
parent8ff761afa24febdb280c672b3b31d6145990f050 (diff)
downloadikiwiki-5a4c95cc352d6895c11542245981c62a5c003370.tar
ikiwiki-5a4c95cc352d6895c11542245981c62a5c003370.tar.gz
enable action bar on misctemplates
So RecentChanges shows on the action bar there, convert recentchanges to use new pageactions hook, with compatability code to avoid breaking old templates.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 33e4e1d1f..46c29abe3 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1748,7 +1748,6 @@ sub misctemplate ($$;@) {
$template->param(
dynamic => 1,
- have_actions => 0, # force off
title => $title,
wikiname => $config{wikiname},
content => $content,
@@ -1756,6 +1755,16 @@ sub misctemplate ($$;@) {
html5 => $config{html5},
@_,
);
+
+ my @actions;
+ run_hooks(pageactions => sub {
+ push @actions, map { { action => $_ } }
+ grep { defined } shift->(page => "");
+ });
+ $template->param(actions => \@actions);
+ if (@actions) {
+ $template->param(have_actions => 1);
+ }
return $template->output;
}