WordPress.org

Make WordPress Core

Changeset 8773


Ignore:
Timestamp:
08/29/08 18:33:04 (6 years ago)
Author:
ryan
Message:

Mike filter suppression. Props DD32. see #7326

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r8766 r8773  
    779779            $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']); 
    780780 
    781         if ( $this->is_posts_page && !$qv['withcomments'] ) 
     781        if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) ) 
    782782            $this->is_comment_feed = false; 
    783783 
     
    833833        $search = ''; 
    834834        $groupby = ''; 
     835        $fields = "$wpdb->posts.*"; 
    835836        $post_status_join = false; 
     837        $page = 1; 
    836838 
    837839        if ( !isset($q['caller_get_posts']) ) 
     
    14331435        } 
    14341436 
     1437        $orderby = $q['orderby']; 
     1438 
    14351439        // Apply post-paging filters on where and join.  Only plugins that 
    14361440        // manipulate paging queries should use these hooks. 
     
    14391443            $groupby = apply_filters('posts_groupby', $groupby); 
    14401444            $join = apply_filters('posts_join_paged', $join); 
    1441             $orderby = apply_filters('posts_orderby', $q['orderby']); 
     1445            $orderby = apply_filters('posts_orderby', $orderby); 
    14421446            $distinct = apply_filters('posts_distinct', $distinct); 
    1443             $fields = apply_filters('posts_fields', "$wpdb->posts.*"); 
     1447            $fields = apply_filters('posts_fields', $fields); 
    14441448            $limits = apply_filters( 'post_limits', $limits ); 
    14451449        } 
     
    14671471            $found_rows = 'SQL_CALC_FOUND_ROWS'; 
    14681472 
    1469         $request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; 
     1473        $this->request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; 
    14701474        if ( !$q['suppress_filters'] ) 
    1471             $this->request = apply_filters('posts_request', $request); 
     1475            $this->request = apply_filters('posts_request', $this->request); 
    14721476 
    14731477        $this->posts = $wpdb->get_results($this->request); 
Note: See TracChangeset for help on using the changeset viewer.