Ticket #22262: 22262.diff
File 22262.diff, 2.0 KB (added by , 12 years ago) |
---|
-
wp-includes/query.php
2406 2406 if ( 'any' == $post_type ) { 2407 2407 $in_search_post_types = get_post_types( array('exclude_from_search' => false) ); 2408 2408 if ( ! empty( $in_search_post_types ) ) 2409 $where .= $wpdb->prepare(" AND $wpdb->posts.post_type IN ('" . join("', '", $in_search_post_types ) . "')");2409 $where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $in_search_post_types ) . "')"; 2410 2410 } elseif ( !empty( $post_type ) && is_array( $post_type ) ) { 2411 2411 $where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $post_type) . "')"; 2412 2412 } elseif ( ! empty( $post_type ) ) { -
wp-includes/wp-db.php
987 987 * @return null|false|string Sanitized query string, null if there is no query, false if there is an error and string 988 988 * if there was something to prepare 989 989 */ 990 function prepare( $query = null ) { // ( $query, *$args )990 function prepare( $query = null, $arg ) { 991 991 if ( is_null( $query ) ) 992 992 return; 993 993 -
wp-includes/ms-functions.php
1919 1919 $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' and archived = '0'", $wpdb->siteid) ); 1920 1920 update_site_option( 'blog_count', $count ); 1921 1921 1922 $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'"));1922 $count = $wpdb->get_var( "SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'" ); 1923 1923 update_site_option( 'user_count', $count ); 1924 1924 }