X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/61426a71868a6863115b0a4e0467756e97953092..6ead2573e91405c268ddd4e4072b3a7b30b6b461:/IkiWiki/Plugin/edittemplate.pm diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index 189a066d8..0bafc95d0 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -3,11 +3,11 @@ package IkiWiki::Plugin::edittemplate; use warnings; use strict; -use IkiWiki 2.00; +use IkiWiki 3.00; use HTML::Template; use Encode; -sub import { #{{{ +sub import { hook(type => "getsetup", id => "edittemplate", call => \&getsetup); hook(type => "needsbuild", id => "edittemplate", @@ -16,19 +16,17 @@ sub import { #{{{ call => \&preprocess); hook(type => "formbuilder", id => "edittemplate", call => \&formbuilder); - hook(type => "refresh", id => "edittemplate", - call => \&refresh); -} #}}} +} -sub getsetup () { #{{{ +sub getsetup () { return plugin => { safe => 1, rebuild => undef, }, -} #}}} +} -sub needsbuild (@) { #{{{ +sub needsbuild (@) { my $needsbuild=shift; foreach my $page (keys %pagestate) { @@ -42,9 +40,9 @@ sub needsbuild (@) { #{{{ } } } -} #}}} +} -sub preprocess (@) { #{{{ +sub preprocess (@) { my %params=@_; return "" if $params{page} ne $params{destpage}; @@ -64,9 +62,9 @@ sub preprocess (@) { #{{{ return sprintf(gettext("edittemplate %s registered for %s"), htmllink($params{page}, $params{destpage}, $link), $params{match}); -} # }}} +} -sub formbuilder (@) { #{{{ +sub formbuilder (@) { my %params=@_; my $form=$params{form}; @@ -105,9 +103,9 @@ sub formbuilder (@) { #{{{ } } } -} #}}} +} -sub filltemplate ($$) { #{{{ +sub filltemplate ($$) { my $template_page=shift; my $page=shift; @@ -138,10 +136,6 @@ sub filltemplate ($$) { #{{{ $template->param(name => $page); return $template->output; -} #}}} - -sub refresh () { - } 1