Make WordPress Core

Changeset 24189


Ignore:
Timestamp:
05/07/2013 04:35:03 PM (11 years ago)
Author:
nacin
Message:

Fix usage of undeclared variables.

  • the_weekday_date() needs the global $currentday
  • ms_site_check() needs the global $current_site
  • media list table does not need to check for $total_orphans
  • upgrader has no $feedback variable, appears to be copypasta from other upgrade APIs
  • install_themes_feature_list() has no $features variable, return array() instead of a new return type of WP_Error

see #24210.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-media-list-table.php

    r24182 r24189  
    4848        $_num_posts = (array) wp_count_attachments();
    4949        $_total_posts = array_sum($_num_posts) - $_num_posts['trash'];
    50         if ( !isset( $total_orphans ) )
    51                 $total_orphans = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1" );
     50        $total_orphans = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1" );
    5251        $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
    5352        foreach ( $matches as $type => $reals )
  • trunk/wp-admin/includes/class-wp-upgrader.php

    r24188 r24189  
    10301030        $this->upgrade_strings();
    10311031
    1032         if ( !empty($feedback) )
    1033             add_filter('update_feedback', $feedback);
    1034 
    10351032        // Is an update available?
    10361033        if ( !isset( $current->response ) || $current->response == 'latest' )
  • trunk/wp-admin/includes/theme-install.php

    r24123 r24189  
    3030 */
    3131function install_themes_feature_list() {
     32    _deprecated_function( __FUNCTION__, '3.1', 'get_theme_feature_list()' );
     33
    3234    if ( !$cache = get_transient( 'wporg_theme_feature_list' ) )
    3335        set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
     
    3840    $feature_list = themes_api( 'feature_list', array() );
    3941    if ( is_wp_error( $feature_list ) )
    40         return $features;
     42        return array();
    4143
    4244    set_transient( 'wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS );
  • trunk/wp-includes/general-template.php

    r24053 r24189  
    15801580 */
    15811581function the_weekday_date($before='',$after='') {
    1582     global $wp_locale, $day, $previousweekday;
     1582    global $wp_locale, $currentday, $previousweekday;
    15831583    $the_weekday_date = '';
    15841584    if ( $currentday != $previousweekday ) {
  • trunk/wp-includes/ms-load.php

    r22449 r24189  
    7070 */
    7171function ms_site_check() {
    72     global $wpdb;
     72    global $wpdb, $current_site;
    7373
    7474    $blog = get_blog_details();
Note: See TracChangeset for help on using the changeset viewer.