r94792 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94791‎ | r94792 | r94793 >
Date:19:06, 17 August 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r92871 (ArticleFeedback dashboard sort order fix)
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/ArticleFeedback/SpecialArticleFeedback.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/SpecialArticleFeedback.php
@@ -365,7 +365,7 @@
366366 * everyone feels warm and fuzzy about having more 'highs', as
367367 * it were...
368368 *
369 - * @param array Pre-orderd from lowest to highest
 369+ * @param array Pre-orderd from highest to lowest
370370 * @return array Containing the... highest rated article data
371371 */
372372 protected function getDailyHighs( $highs_lows ) {
@@ -375,7 +375,10 @@
376376 } else {
377377 $num_highs = $num_ratings / 2;
378378 }
379 - return array_slice( $highs_lows, -$num_highs, $num_highs );
 379+ $highs = array_slice( $highs_lows, -$num_highs, $num_highs );
 380+
 381+ // Sort descending
 382+ return array_reverse( $highs );
380383 }
381384
382385 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92871ArticleFeedback: reverse the sort order of highs so the best appear firstwerdna18:18, 22 July 2011

Status & tagging log