WordPress.org

Make WordPress Core

Ticket #14593: ellisgl-forceindex.patch

File ellisgl-forceindex.patch, 1.0 KB (added by ellisgl, 5 years ago)

Patch

  • wp-includes/functions.php

    Property changes on: .
    ___________________________________________________________________
    Added: svn:ignore
       + nbproject
    
    
     
    441441        $core_options = array('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'dashboard_blog', 'can_compress_scripts', 'global_terms_enabled' ); 
    442442 
    443443        $core_options_in = "'" . implode("', '", $core_options) . "'"; 
    444         $options = $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE meta_key IN ($core_options_in) AND site_id = %d", $site_id) ); 
     444        $options = $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->sitemeta FORCE INDEX(site_id) WHERE meta_key IN ($core_options_in) AND site_id = %d", $site_id) ); 
    445445 
    446446        foreach ( $options as $option ) { 
    447447                $key = $option->meta_key;