From: Bartosz DziewoƄski Date: Thu, 4 Sep 2014 20:13:53 +0000 (+0200) Subject: Fix directions of some pagers X-Git-Tag: 1.31.0-rc.0~14160 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=dc4c88b24a726367390ddb12c371933d7df448e2;p=lhc%2Fweb%2Fwiklou.git Fix directions of some pagers Follow-up to 6a637fb0. Turns out these are more confusing than I originally suspected. Bug: 70413 Change-Id: Ic4245d9ac14e4cd2f8f5aca0878edcd4dcf85521 --- diff --git a/includes/specials/SpecialAllMessages.php b/includes/specials/SpecialAllMessages.php index 760b41b5cf..96be4d032f 100644 --- a/includes/specials/SpecialAllMessages.php +++ b/includes/specials/SpecialAllMessages.php @@ -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; diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index 842a25a2cf..456f4ecb5b 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -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() ); } diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 2f06bead5b..32a887c407 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -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 = ''; diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 79eaa8c985..68f2c4695d 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -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 = ''; diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 5d497646df..04a83c8f5d 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -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 );