Fix directions of some pagers
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 4 Sep 2014 20:13:53 +0000 (22:13 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 4 Sep 2014 20:21:12 +0000 (22:21 +0200)
Follow-up to 6a637fb0. Turns out these are more confusing than
I originally suspected.

Bug: 70413
Change-Id: Ic4245d9ac14e4cd2f8f5aca0878edcd4dcf85521

includes/specials/SpecialAllMessages.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialListfiles.php

index 760b41b..96be4d0 100644 (file)
@@ -101,7 +101,8 @@ class AllMessagesTablePager extends TablePager {
                $this->mIndexField = 'am_title';
                $this->mPage = $page;
                $this->mConds = $conds;
-               $this->mDefaultDirection = IndexPager::DIR_ASCENDING;
+               // FIXME: Why does this need to be set to DIR_DESCENDING to produce ascending ordering?
+               $this->mDefaultDirection = IndexPager::DIR_DESCENDING;
                $this->mLimitsShown = array( 20, 50, 100, 250, 500, 5000 );
 
                global $wgContLang;
index 842a25a..456f4ec 100644 (file)
@@ -224,7 +224,7 @@ class BlockListPager extends TablePager {
        function __construct( $page, $conds ) {
                $this->page = $page;
                $this->conds = $conds;
-               $this->mDefaultDirection = IndexPager::DIR_ASCENDING;
+               $this->mDefaultDirection = IndexPager::DIR_DESCENDING;
                parent::__construct( $page->getContext() );
        }
 
index 2f06bea..32a887c 100644 (file)
@@ -652,7 +652,7 @@ class SpecialContributions extends IncludableSpecialPage {
  * @ingroup SpecialPage Pager
  */
 class ContribsPager extends ReverseChronologicalPager {
-       public $mDefaultDirection = IndexPager::DIR_ASCENDING;
+       public $mDefaultDirection = IndexPager::DIR_DESCENDING;
        public $messages;
        public $target;
        public $namespace = '';
index 79eaa8c..68f2c46 100644 (file)
@@ -26,7 +26,7 @@
  * @ingroup SpecialPage
  */
 class DeletedContribsPager extends IndexPager {
-       public $mDefaultDirection = IndexPager::DIR_ASCENDING;
+       public $mDefaultDirection = IndexPager::DIR_DESCENDING;
        public $messages;
        public $target;
        public $namespace = '';
index 5d49764..04a83c8 100644 (file)
@@ -108,12 +108,12 @@ class ImageListPager extends TablePager {
 
                if ( !$including ) {
                        if ( $context->getRequest()->getText( 'sort', 'img_date' ) == 'img_date' ) {
-                               $this->mDefaultDirection = IndexPager::DIR_ASCENDING;
-                       } else {
                                $this->mDefaultDirection = IndexPager::DIR_DESCENDING;
+                       } else {
+                               $this->mDefaultDirection = IndexPager::DIR_ASCENDING;
                        }
                } else {
-                       $this->mDefaultDirection = IndexPager::DIR_ASCENDING;
+                       $this->mDefaultDirection = IndexPager::DIR_DESCENDING;
                }
 
                parent::__construct( $context );