X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/274219ecc865f9bdcb65ad26e4750fa90dfaa670..338e49df1533e09a8ba3f1225f75a2bf4deaf4a8:/IkiWiki/Plugin/websetup.pm diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index 2674b91e8..0a3d90aec 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -219,7 +219,8 @@ sub showfields ($$$@) { options => [ [ 1 => $description ] ], fieldset => $section, ); - if (! $form->submitted) { + if (! $form->submitted || + ($info{advanced} && $form->submitted eq 'Advanced Mode')) { $form->field(name => $name, value => $value); } } @@ -287,7 +288,7 @@ sub showform ($$) { fieldsets => [ [main => gettext("main")], ], - action => $config{cgiurl}, + action => IkiWiki::cgiurl(), template => {type => 'div'}, stylesheet => 1, ); @@ -343,7 +344,7 @@ sub showform ($$) { IkiWiki::decode_form_utf8($form); if ($form->submitted eq "Cancel") { - IkiWiki::redirect($cgi, $config{url}); + IkiWiki::redirect($cgi, IkiWiki::baseurl(undef)); return; } elsif (($form->submitted eq 'Save Setup' || $form->submitted eq 'Rebuild Wiki') && $form->validate) { @@ -446,10 +447,10 @@ sub showform ($$) { IkiWiki::saveindex(); IkiWiki::unlockwiki(); - # Print the top part of a standard misctemplate, + # Print the top part of a standard cgitemplate, # then show the rebuild or refresh, live. my $divider="\0"; - my $html=IkiWiki::misctemplate("setup", $divider); + my $html=IkiWiki::cgitemplate($cgi, "setup", $divider); IkiWiki::printheader($session); my ($head, $tail)=split($divider, $html, 2); print $head."
\n";
@@ -474,7 +475,7 @@ sub showform ($$) {
 						join(" ", @command), $ret).
 					'

'; open(OUT, ">", $config{setupfile}) || error("$config{setupfile}: $!"); - print OUT $oldsetup; + print OUT Encode::encode_utf8($oldsetup); close OUT; }