Make WordPress Core

Ticket #4003: trunk-4003.diff

File trunk-4003.diff, 4.0 KB (added by charleshooper, 18 years ago)

Updated version of patch.diff to check WP_SITEURL value during install and also change is_blog_installed to return boolean value

  • wp-includes/default-filters.php

     
    145145// Misc filters
    146146add_filter('option_ping_sites', 'privacy_ping_filter');
    147147add_filter('option_blog_charset', 'wp_specialchars');
     148add_filter('option_home', '_config_wp_home');
     149add_filter('option_siteurl', '_config_wp_siteurl');
    148150add_filter('mce_plugins', '_mce_load_rtl_plugin');
    149151add_filter('mce_buttons', '_mce_add_direction_buttons');
    150152
     
    171173add_action('admin_print_scripts', 'wp_print_scripts', 20);
    172174add_action('mce_options', '_mce_set_direction');
    173175add_action('init', 'smilies_init', 5);
    174 ?>
    175  No newline at end of file
     176?>
  • wp-includes/functions.php

     
    993993        $wpdb->hide_errors();
    994994        $installed = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'");
    995995        $wpdb->show_errors();
    996         return $installed;
     996
     997        $install_status = !empty( $installed ) ? TRUE : FALSE;
     998        return $install_status;
    997999}
    9981000
    9991001function wp_nonce_url($actionurl, $action = -1) {
     
    13511353        die();
    13521354}
    13531355
     1356function _config_wp_home($url = '') {
     1357        if ( defined( 'WP_HOME' ) )
     1358                return WP_HOME;
     1359        else return $url;
     1360}
     1361
     1362function _config_wp_siteurl($url = '') {
     1363        if ( defined( 'WP_SITEURL' ) )
     1364                return WP_SITEURL;
     1365        else return $url;
     1366}
     1367
    13541368function _mce_set_direction() {
    13551369        global $wp_locale;
    13561370
     
    14431457        }
    14441458}
    14451459
    1446 ?>
    1447  No newline at end of file
     1460?>
  • wp-admin/upgrade-functions.php

     
    2121        update_option('admin_email', $user_email);
    2222        update_option('blog_public', $public);
    2323        $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
    24         $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
     24
     25        if( defined('WP_SITEURL') && '' != WP_SITEURL ) {
     26                $guessurl = WP_SITEURL;
     27        } else {
     28                $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
     29        }
    2530        update_option('siteurl', $guessurl);
    2631
    2732        // If not a public blog, don't ping.
  • wp-admin/options-general.php

     
    2525</tr>
    2626<tr valign="top">
    2727<th scope="row"><?php _e('WordPress address (URL):') ?></th>
    28 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code" /></td>
     28<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
    2929</tr>
    3030<tr valign="top">
    3131<th scope="row"><?php _e('Blog address (URL):') ?></th>
    32 <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code" /><br /><?php _e('If you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different than the directory</a> you installed WordPress in, enter that address here.'); ?></td>
     32<td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /><br /><?php _e('If you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different than the directory</a> you installed WordPress in, enter that address here.'); ?></td>
    3333</tr>
    3434<tr valign="top">
    3535<th scope="row"><?php _e('E-mail address:') ?> </th>