Make WordPress Core

Changeset 31124


Ignore:
Timestamp:
01/10/2015 05:56:45 AM (10 years ago)
Author:
wonderboymusic
Message:

Declare $wp_version, $required_php_version, and $required_mysql_version as globals in install and upgrade admin files.

See #30799.

Location:
trunk/src/wp-admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update-core.php

    r31073 r31124  
    813813    // Import $wp_version, $required_php_version, and $required_mysql_version from the new version
    814814    // $wp_filesystem->wp_content_dir() returned unslashed pre-2.8
     815    global $wp_version, $required_php_version, $required_mysql_version;
     816
    815817    $versions_file = trailingslashit( $wp_filesystem->wp_content_dir() ) . 'upgrade/version-current.php';
    816818    if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $versions_file ) ) {
     
    825827    $php_version    = phpversion();
    826828    $mysql_version  = $wpdb->db_version();
    827     $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from
     829    $old_wp_version = $wp_version; // The version of WordPress we're updating from
    828830    $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
    829831    $php_compat     = version_compare( $php_version, $required_php_version, '>=' );
  • trunk/src/wp-admin/install.php

    r31090 r31124  
    159159    die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p><p class="step"><a href="../wp-login.php" class="button button-large">' . __( 'Log In' ) . '</a></p></body></html>' );
    160160}
     161
     162global $wp_version, $required_php_version, $required_mysql_version;
    161163
    162164$php_version    = phpversion();
  • trunk/src/wp-admin/options-general.php

    r31034 r31124  
    320320<td><select name="start_of_week" id="start_of_week">
    321321<?php
     322global $wp_locale;
     323
    322324for ($day_index = 0; $day_index <= 6; $day_index++) :
    323325    $selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
  • trunk/src/wp-admin/upgrade.php

    r28896 r31124  
    3535    die( '0' );
    3636}
     37
     38global $wp_version, $required_php_version, $required_mysql_version;
    3739
    3840$step = (int) $step;
Note: See TracChangeset for help on using the changeset viewer.