summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-03 13:59:43 -0400
committerJoey Hess <joey@kitenet.net>2010-05-03 13:59:43 -0400
commit9699f16b5186237ca98ebfc90a8644b672485245 (patch)
tree122744c42c6d4be8093f98e375e28c9bb96d6896 /IkiWiki/Plugin
parent0fc32c8b2fa1fc23c0c2c654ad64de7f85a271d1 (diff)
websetup: Only display Setup button on admins' preferences page.
Renamed it from "Wiki Setup" to just "Setup" for good measure.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/websetup.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm
index cb6a7e412..4d2e611eb 100644
--- a/IkiWiki/Plugin/websetup.pm
+++ b/IkiWiki/Plugin/websetup.pm
@@ -503,9 +503,10 @@ sub formbuilder_setup (@) {
my %params=@_;
my $form=$params{form};
- if ($form->title eq "preferences") {
- push @{$params{buttons}}, "Wiki Setup";
- if ($form->submitted && $form->submitted eq "Wiki Setup") {
+ if ($form->title eq "preferences" &&
+ IkiWiki::is_admin($params{session}->param("name"))) {
+ push @{$params{buttons}}, "Setup";
+ if ($form->submitted && $form->submitted eq "Setup") {
showform($params{cgi}, $params{session});
exit;
}