aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2007-12-12 03:01:15 -0500
committerJoey Hess <joey@kitenet.net>2007-12-12 03:15:30 -0500
commit4745391360cf0843e376676479fee306d0a8312d (patch)
tree55edb11f77b680c05f482151b44f4b6a0f2f1f56 /IkiWiki
parentc46b17983dc5549172dabb461b72a4ed11f110ae (diff)
downloadikiwiki-4745391360cf0843e376676479fee306d0a8312d.tar
ikiwiki-4745391360cf0843e376676479fee306d0a8312d.tar.gz
* 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!)
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/CGI.pm7
-rw-r--r--IkiWiki/Plugin/edittemplate.pm6
-rw-r--r--IkiWiki/Plugin/passwordauth.pm3
3 files changed, 6 insertions, 10 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 75f096e13..567fa85be 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -33,10 +33,9 @@ sub showform ($$$$) { #{{{
buttons => $buttons);
});
}
- else {
- printheader($session);
- print misctemplate($form->title, $form->render(submit => $buttons));
- }
+
+ printheader($session);
+ print misctemplate($form->title, $form->render(submit => $buttons));
}
sub redirect ($$) { #{{{
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