Use WP_HOME and WP_SITEURL in upgrading. Props filosofo. fixes #4211

git-svn-id: http://svn.automattic.com/wordpress/trunk@5394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-05-05 00:17:05 +00:00
parent 8638b7ab3a
commit 69f36791f1
1 changed files with 9 additions and 1 deletions

View File

@ -671,7 +671,15 @@ function get_alloptions_110() {
// Version of get_option that is private to install/upgrade.
function __get_option($setting) {
global $wpdb;
if ( $setting == 'home' && defined( 'WP_HOME' ) ) {
return preg_replace( '|/+$|', '', constant( 'WP_HOME' ) );
}
if ( $setting == 'siteurl' && defined( 'WP_SITEURL' ) ) {
return preg_replace( '|/+$|', '', constant( 'WP_SITEURL' ) );
}
$option = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
if ( 'home' == $setting && '' == $option )