Ticket #58368: wp-comment-query-get-comment-count-no-orderby.patch
| File wp-comment-query-get-comment-count-no-orderby.patch, 644 bytes (added by , 3 years ago) |
|---|
-
wp-includes/class-wp-comment-query.php
diff -u a/wp-includes/class-wp-comment-query.php b/wp-includes/class-wp-comment-query.php
a b 959 959 $this->sql_clauses['select'] = "SELECT $found_rows $fields"; 960 960 $this->sql_clauses['from'] = "FROM $wpdb->comments $join"; 961 961 $this->sql_clauses['groupby'] = $groupby; 962 $this->sql_clauses['orderby'] = $orderby; 962 if ( !$this->query_vars['count'] ) 963 $this->sql_clauses['orderby'] = $orderby; 963 964 $this->sql_clauses['limits'] = $limits; 964 965 965 966 $this->request = "