X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2bceb10b5fd06e8e0867cbc6d72a16cbaae35803..bb7877707ef730c7fdab01509ac6a9cc9eb252d1:/IkiWiki/CGI.pm

diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 866711a71..49a505514 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -15,7 +15,8 @@ sub printheader ($) {
 	if ($config{sslcookie}) {
 		print $session->header(-charset => 'utf-8',
 			-cookie => $session->cookie(-httponly => 1, -secure => 1));
-	} else {
+	}
+	else {
 		print $session->header(-charset => 'utf-8',
 			-cookie => $session->cookie(-httponly => 1));
 	}
@@ -52,7 +53,7 @@ sub redirect ($$) {
 }
 
 sub decode_cgi_utf8 ($) {
-	# decode_form_utf8 method is needed for 5.10
+	# decode_form_utf8 method is needed for 5.01
 	if ($] < 5.01) {
 		my $cgi = shift;
 		foreach my $f ($cgi->param) {
@@ -65,8 +66,9 @@ sub decode_form_utf8 ($) {
 	if ($] >= 5.01) {
 		my $form = shift;
 		foreach my $f ($form->field) {
+			my @value=map { decode_utf8($_) } $form->field($f);
 			$form->field(name  => $f,
-			             value => decode_utf8($form->field($f)),
+			             value => \@value,
 		                     force => 1,
 			);
 		}
@@ -106,7 +108,7 @@ sub cgi_signin ($$) {
 		action => $config{cgiurl},
 		header => 0,
 		template => {type => 'div'},
-		stylesheet => baseurl()."style.css",
+		stylesheet => 1,
 	);
 	my $buttons=["Login"];
 	
@@ -185,7 +187,7 @@ sub cgi_prefs ($$) {
 		params => $q,
 		action => $config{cgiurl},
 		template => {type => 'div'},
-		stylesheet => baseurl()."style.css",
+		stylesheet => 1,
 		fieldsets => [
 			[login => gettext("Login")],
 			[preferences => gettext("Preferences")],