X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/60ed2aa9e45f0652430483398bc39db1d09c6d38..0ae1e4cc0e598eacfeb508d11db81c33169631fd:/IkiWiki/CGI.pm?ds=sidebyside

diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 28020b500..e0bfda9ae 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -116,7 +116,7 @@ sub cgi_signin ($$;$) {
 		required => 'NONE',
 		javascript => 0,
 		params => $q,
-		action => $config{cgiurl},
+		action => cgiurl(),
 		header => 0,
 		template => {type => 'div'},
 		stylesheet => 1,
@@ -198,7 +198,7 @@ sub cgi_prefs ($$) {
 		required => 'NONE',
 		javascript => 0,
 		params => $q,
-		action => $config{cgiurl},
+		action => cgiurl(),
 		template => {type => 'div'},
 		stylesheet => 1,
 		fieldsets => [
@@ -231,11 +231,11 @@ sub cgi_prefs ($$) {
 	
 	if ($form->submitted eq 'Logout') {
 		$session->delete();
-		redirect($q, $config{url});
+		redirect($q, baseurl(undef));
 		return;
 	}
 	elsif ($form->submitted eq 'Cancel') {
-		redirect($q, $config{url});
+		redirect($q, baseurl(undef));
 		return;
 	}
 	elsif ($form->submitted eq 'Save Preferences' && $form->validate) {
@@ -283,7 +283,7 @@ sub check_banned ($$) {
 
 	foreach my $b (@{$config{banned_users}}) {
 		if (pagespec_match("", $b,
-			ip => $ENV{REMOTE_ADDR},
+			ip => $session->remote_addr(),
 			name => defined $name ? $name : "",
 		)) {
 			$banned=1;