Make WordPress Core


Ignore:
Timestamp:
04/03/2008 03:06:01 AM (19 years ago)
Author:
markjaquith
Message:

Fix gallery shortcode orderby param for all SQL setups. Sanitize orderby. fixes #6476 for 2.5.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-includes/post.php

    r7482 r7593  
    460460        if (!empty($exclusions))
    461461                $exclusions .= ')';
     462
     463        // orderby
     464        if ( preg_match( '/.+ +(ASC|DESC)/i', $orderby ) )
     465                $order = ''; // orderby has its own order, so we'll use that
    462466
    463467        $query  = "SELECT DISTINCT * FROM $wpdb->posts ";
Note: See TracChangeset for help on using the changeset viewer.