From 9699f16b5186237ca98ebfc90a8644b672485245 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 3 May 2010 13:59:43 -0400 Subject: websetup: Only display Setup button on admins' preferences page. Renamed it from "Wiki Setup" to just "Setup" for good measure. --- IkiWiki/Plugin/websetup.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'IkiWiki/Plugin') 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; } -- cgit v1.2.3