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

git-svn-id: https://develop.svn.wordpress.org/trunk@5394 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n 2007-05-05 00:17:05 +00:00
parent e191edb9ca
commit 8653896af0

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 )