X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/127bceef5b4799e58cb068043e49ed16a3ec840d..5c7771e01aafb7b2e197f58a725132e4c2f4bde8:/IkiWiki/Plugin/testpagespec.pm?ds=inline diff --git a/IkiWiki/Plugin/testpagespec.pm b/IkiWiki/Plugin/testpagespec.pm index f9ec90d87..9f9b50f01 100644 --- a/IkiWiki/Plugin/testpagespec.pm +++ b/IkiWiki/Plugin/testpagespec.pm @@ -6,15 +6,24 @@ use strict; use IkiWiki 2.00; sub import { #{{{ + hook(type => "getsetup", id => "testpagespec", call => \&getsetup); hook(type => "preprocess", id => "testpagespec", call => \&preprocess); } # }}} +sub getsetup () { #{{{ + return + plugin => { + safe => 1, + rebuild => undef, + }, +} #}}} + sub preprocess (@) { #{{{ my %params=@_; foreach my $param (qw{match pagespec}) { if (! exists $params{$param}) { - return "[[testpagespec $param parameter is required]]"; + error sprintf(gettext("%s parameter is required"), $param); } }