Changeset 30004 for trunk/src/wp-includes/comment.php
- Timestamp:
- 10/24/2014 02:50:24 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r30003 r30004 388 388 $order = ( 'ASC' == strtoupper( $this->query_vars['order'] ) ) ? 'ASC' : 'DESC'; 389 389 390 if ( ! empty( $this->query_vars['orderby'] ) ) { 390 // Disable ORDER BY with 'none', an empty array, or boolean false. 391 if ( in_array( $this->query_vars['orderby'], array( 'none', array(), false ), true ) ) { 392 $orderby = ''; 393 } else if ( ! empty( $this->query_vars['orderby'] ) ) { 391 394 $ordersby = is_array( $this->query_vars['orderby'] ) ? 392 395 $this->query_vars['orderby'] : … … 589 592 } 590 593 591 $this->request = "SELECT $fields FROM $wpdb->comments $join WHERE $where $groupby $orderby $order $limits"; 594 if ( $orderby ) { 595 $orderby = "ORDER BY $orderby $order"; 596 } 597 598 $this->request = "SELECT $fields FROM $wpdb->comments $join WHERE $where $groupby $orderby $limits"; 592 599 593 600 if ( $this->query_vars['count'] ) {
Note: See TracChangeset
for help on using the changeset viewer.