remove LOWER() in Order by clause for Post Meta. Allows MySQL to use the indexes properly. Props Denis-de-Bernardy. Fixes #11741
git-svn-id: https://develop.svn.wordpress.org/trunk@13503 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
81b675575d
commit
28f4212cd2
|
@ -2427,7 +2427,7 @@ function meta_form() {
|
||||||
FROM $wpdb->postmeta
|
FROM $wpdb->postmeta
|
||||||
GROUP BY meta_key
|
GROUP BY meta_key
|
||||||
HAVING meta_key NOT LIKE '\_%'
|
HAVING meta_key NOT LIKE '\_%'
|
||||||
ORDER BY LOWER(meta_key)
|
ORDER BY meta_key
|
||||||
LIMIT $limit" );
|
LIMIT $limit" );
|
||||||
if ( $keys )
|
if ( $keys )
|
||||||
natcasesort($keys);
|
natcasesort($keys);
|
||||||
|
@ -3288,7 +3288,7 @@ function find_posts_div($found_action = '') {
|
||||||
<?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?>
|
<?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?>
|
||||||
<label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label>
|
<label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label>
|
||||||
<input type="text" id="find-posts-input" name="ps" value="" />
|
<input type="text" id="find-posts-input" name="ps" value="" />
|
||||||
<input type="button" onclick="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />
|
<input type="button" onClick="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />
|
||||||
|
|
||||||
<input type="radio" name="find-posts-what" id="find-posts-posts" checked="checked" value="posts" />
|
<input type="radio" name="find-posts-what" id="find-posts-posts" checked="checked" value="posts" />
|
||||||
<label for="find-posts-posts"><?php _e( 'Posts' ); ?></label>
|
<label for="find-posts-posts"><?php _e( 'Posts' ); ?></label>
|
||||||
|
@ -3298,7 +3298,7 @@ function find_posts_div($found_action = '') {
|
||||||
<div id="find-posts-response"></div>
|
<div id="find-posts-response"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="find-box-buttons">
|
<div class="find-box-buttons">
|
||||||
<input type="button" class="button alignleft" onclick="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" />
|
<input type="button" class="button alignleft" onClick="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" />
|
||||||
<input id="find-posts-submit" type="submit" class="button-primary alignright" value="<?php esc_attr_e('Select'); ?>" />
|
<input id="find-posts-submit" type="submit" class="button-primary alignright" value="<?php esc_attr_e('Select'); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue