Ensure that order is specified when querying for comment descendants.
Props tellyworth. Fixes #34838. git-svn-id: https://develop.svn.wordpress.org/trunk@35757 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
594ce27b61
commit
14eae0a8a7
@ -883,7 +883,7 @@ class WP_Comment_Query {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$where = 'WHERE ' . implode( ' AND ', $where_clauses ) . ' AND comment_parent IN (' . implode( ',', array_map( 'intval', $parent_ids ) ) . ')';
|
$where = 'WHERE ' . implode( ' AND ', $where_clauses ) . ' AND comment_parent IN (' . implode( ',', array_map( 'intval', $parent_ids ) ) . ')';
|
||||||
$comment_ids = $wpdb->get_col( "{$this->sql_clauses['select']} {$this->sql_clauses['from']} {$where} {$this->sql_clauses['groupby']}" );
|
$comment_ids = $wpdb->get_col( "{$this->sql_clauses['select']} {$this->sql_clauses['from']} {$where} {$this->sql_clauses['groupby']} ORDER BY comment_date_gmt ASC, comment_ID ASC" );
|
||||||
|
|
||||||
$level++;
|
$level++;
|
||||||
$levels[ $level ] = $comment_ids;
|
$levels[ $level ] = $comment_ids;
|
||||||
|
Loading…
Reference in New Issue
Block a user