jenkins-bot has submitted this change and it was merged.

Change subject: Sort the combined header+topic revisions after merging
......................................................................


Sort the combined header+topic revisions after merging

Change-Id: I3851469b3b8995a0aebfcb9f7444c9975789ba5a
---
M includes/Data/BoardHistoryStorage.php
1 file changed, 5 insertions(+), 6 deletions(-)

Approvals:
  Werdna: Looks good to me, but someone else must approve
  Matthias Mullie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Data/BoardHistoryStorage.php 
b/includes/Data/BoardHistoryStorage.php
index a33b160..b23602e 100644
--- a/includes/Data/BoardHistoryStorage.php
+++ b/includes/Data/BoardHistoryStorage.php
@@ -25,12 +25,11 @@
                if ( count( $queries ) > 1 ) {
                        throw new DataModelException( __METHOD__ . ' expects 
only one value in $queries', 'process-data' );
                }
-               return RevisionStorage::mergeExternalContent(
-                        array(
-                                $this->findHeaderHistory( $queries, $options ) 
+
-                                $this->findTopicListHistory( $queries, 
$options )
-                        )
-               );
+               $merged = $this->findHeaderHistory( $queries, $options ) +
+                       $this->findTopicListHistory( $queries, $options );
+               // newest items at the begining of the list
+               krsort( $merged );
+               return RevisionStorage::mergeExternalContent( array( $merged ) 
);
        }
 
        function findHeaderHistory( array $queries, array $options = array() ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/115531
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3851469b3b8995a0aebfcb9f7444c9975789ba5a
Gerrit-PatchSet: 12
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Werdna <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to