From 4745391360cf0843e376676479fee306d0a8312d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 12 Dec 2007 03:01:15 -0500 Subject: * Change formbuilder hook to not be responsible for displaying a form, so that more than one plugin can use this hook. I believe this is a safe change, since only passwordauth uses this hook. (If some other plugin already used it, it would have broken passwordauth!) --- IkiWiki/Plugin/edittemplate.pm | 6 +++--- IkiWiki/Plugin/passwordauth.pm | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index 20c948eb1..6689b9a5c 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -12,8 +12,8 @@ sub import { #{{{ call => \&needsbuild); hook(type => "preprocess", id => "edittemplate", call => \&preprocess); - hook(type => "formbuilder_setup", id => "edittemplate", - call => \&formbuilder_setup); + hook(type => "formbuilder", id => "edittemplate", + call => \&formbuilder); } #}}} sub needsbuild (@) { #{{{ @@ -49,7 +49,7 @@ sub preprocess (@) { #{{{ $params{template}, $params{match}); } # }}} -sub formbuilder_setup (@) { #{{{ +sub formbuilder (@) { #{{{ my %params=@_; my $form=$params{form}; diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm index b61e6c86e..af16c2754 100644 --- a/IkiWiki/Plugin/passwordauth.pm +++ b/IkiWiki/Plugin/passwordauth.pm @@ -211,9 +211,6 @@ sub formbuilder (@) { #{{{ } } } - - IkiWiki::printheader($session); - print IkiWiki::misctemplate($form->title, $form->render(submit => $buttons)); } #}}} 1 -- cgit v1.2.3