Properly redirect to install.php when visiting wp-login.php with a config file but no db. Props SergeyBiryukov. fixes #18397

git-svn-id: http://svn.automattic.com/wordpress/trunk@19923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2012-02-14 18:08:45 +00:00
parent 15c7c9095b
commit f5e4af9b53
1 changed files with 1 additions and 1 deletions

View File

@ -3048,7 +3048,7 @@ function wp_guess_url() {
$url = WP_SITEURL;
} else {
$schema = is_ssl() ? 'https://' : 'http://';
$url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
$url = preg_replace('#/(wp-admin/.*|wp-login.php)#i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
}
return rtrim($url, '/');
}