summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/recentchanges.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-26 00:38:13 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-26 00:38:13 -0400
commit84c905ec2011ec846d3d8b27f21f5ffd53c73840 (patch)
treea9c84e91314ea4939bc6dc46492a86784e35fef2 /IkiWiki/Plugin/recentchanges.pm
parentb74b7ab68b983b3f7d9e561eb991b21764cdb3be (diff)
finish adding getsetup hooks to plugins
Diffstat (limited to 'IkiWiki/Plugin/recentchanges.pm')
-rw-r--r--IkiWiki/Plugin/recentchanges.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index 8383fb72a..04a878b20 100644
--- a/IkiWiki/Plugin/recentchanges.pm
+++ b/IkiWiki/Plugin/recentchanges.pm
@@ -6,6 +6,7 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "recentchanges", call => \&getsetup);
hook(type => "checkconfig", id => "recentchanges", call => \&checkconfig);
hook(type => "refresh", id => "recentchanges", call => \&refresh);
hook(type => "pagetemplate", id => "recentchanges", call => \&pagetemplate);
@@ -13,6 +14,24 @@ sub import { #{{{
hook(type => "cgi", id => "recentchanges", call => \&cgi);
} #}}}
+sub getsetup () { #{{{
+ return
+ recentchangespage => {
+ type => "string",
+ default => "recentchanges",
+ description => "name of the recentchanges page",
+ safe => 1,
+ rebuild => 1,
+ },
+ recentchangesnum => {
+ type => "int",
+ default => 100,
+ description => "number of changes to track",
+ safe => 1,
+ rebuild => 0,
+ },
+} #}}}
+
sub checkconfig () { #{{{
$config{recentchangespage}='recentchanges' unless defined $config{recentchangespage};
$config{recentchangesnum}=100 unless defined $config{recentchangesnum};