]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/websetup.pm
update
[git.ikiwiki.info.git] / IkiWiki / Plugin / websetup.pm
index d444c0a3d2b67e228737d592d66a04b082876960..9cb5eb13c13740ed6e609679c49b0468458ec115 100644 (file)
@@ -102,7 +102,7 @@ sub showfields ($$$@) {
        }
 
        my $section=defined $plugin
-               ? sprintf(gettext("%s plugin:"), $plugininfo{section}).$plugin
+               ? sprintf(gettext("%s plugin:"), $plugininfo{section})." ".$plugin
                : "main";
        my %enabledfields;
        my $shownfields=0;
@@ -265,6 +265,8 @@ sub showform ($$) {
        my $cgi=shift;
        my $session=shift;
 
+       IkiWiki::needsignin($cgi, $session);
+
        if (! defined $session->param("name") || 
            ! IkiWiki::is_admin($session->param("name"))) {
                error(gettext("you are not logged in as an admin"));
@@ -291,7 +293,7 @@ sub showform ($$) {
                ],
                action => $config{cgiurl},
                template => {type => 'div'},
-               stylesheet => IkiWiki::baseurl()."style.css",
+               stylesheet => 1,
        );
        
        $form->field(name => "do", type => "hidden", value => "setup",
@@ -501,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;
                }