[wp-trac] Re: [WordPress Trac] #6772: get_posts Should Use WP_Query

WordPress Trac wp-trac at lists.automattic.com
Thu May 8 01:03:45 GMT 2008


#6772: get_posts Should Use WP_Query
-----------------------------------------------+----------------------------
 Reporter:  filosofo                           |        Owner:  anonymous
     Type:  defect                             |       Status:  reopened 
 Priority:  normal                             |    Milestone:  2.6      
Component:  General                            |      Version:  2.6      
 Severity:  blocker                            |   Resolution:           
 Keywords:  wp_query get_posts wpdb has-patch  |  
-----------------------------------------------+----------------------------
Comment (by mdawaffe):

 6772-absint-concat-and-parent.diff

  1. Sanitizes {{{post__in}}} and {{{post__not_in}}}.
  2. Converts most of the (int) and intval() sanitation to absint(). I'm
 pretty sure I left all the arguments that can be negative (like cat,
 posts_per_page, etc.). I'm not sure if the time arguments should be
 allowed to be negative or not.
  3. Prevents WP_Query from stomping on $where variable when {{{p}}},
 {{{post_parent}}}, {{{post__in}}}, or {{{post__not_in}}} argument is
 passed.
  4. Pulls {{{post_parent}}} out from a case in an elseif chain so that it
 can be used independently.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6772#comment:14>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list