From 939291df9fd1e383fdad55e7e9f9f39a9badcf15 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 3 Dec 2015 15:50:27 +0000 Subject: [PATCH] Ensure that order is specified when querying for comment descendants. Props tellyworth. Fixes #34838. Built from https://develop.svn.wordpress.org/trunk@35757 git-svn-id: http://core.svn.wordpress.org/trunk@35721 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-comment-query.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-comment-query.php b/wp-includes/class-wp-comment-query.php index 1a8bff8d6b..e30094ddfc 100644 --- a/wp-includes/class-wp-comment-query.php +++ b/wp-includes/class-wp-comment-query.php @@ -883,7 +883,7 @@ class WP_Comment_Query { } $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++; $levels[ $level ] = $comment_ids; diff --git a/wp-includes/version.php b/wp-includes/version.php index 7b74e1c243..fe2032da99 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-RC1-35756'; +$wp_version = '4.4-RC1-35757'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.