From 9fe8ff24e2c62c3d38794208a93565ad5609068a Mon Sep 17 00:00:00 2001 From: saxmatt Date: Mon, 9 Aug 2004 09:29:25 +0000 Subject: [PATCH] Fix for people who move. git-svn-id: http://svn.automattic.com/wordpress/trunk@1526 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-login.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-login.php b/wp-login.php index 311f3b6942..f4a1b5c901 100644 --- a/wp-login.php +++ b/wp-login.php @@ -37,6 +37,10 @@ for ($i = 0; $i < count($wpvarstoreset); $i = $i + 1) { } } +// If someone has moved WordPress let's try to detect it +if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) != get_settings('siteurl') ) + update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) ); + switch($action) { case 'logout':