Make WordPress Core

Ticket #22262: 22262.diff

File 22262.diff, 2.0 KB (added by nacin, 12 years ago)
  • wp-includes/query.php

     
    24062406                if ( 'any' == $post_type ) {
    24072407                        $in_search_post_types = get_post_types( array('exclude_from_search' => false) );
    24082408                        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 ) . "')";
    24102410                } elseif ( !empty( $post_type ) && is_array( $post_type ) ) {
    24112411                        $where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $post_type) . "')";
    24122412                } elseif ( ! empty( $post_type ) ) {
  • wp-includes/wp-db.php

     
    987987         * @return null|false|string Sanitized query string, null if there is no query, false if there is an error and string
    988988         *      if there was something to prepare
    989989         */
    990         function prepare( $query = null ) { // ( $query, *$args )
     990        function prepare( $query = null, $arg ) {
    991991                if ( is_null( $query ) )
    992992                        return;
    993993
  • wp-includes/ms-functions.php

     
    19191919        $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) );
    19201920        update_site_option( 'blog_count', $count );
    19211921
    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'" );
    19231923        update_site_option( 'user_count', $count );
    19241924}