Restores position of parent constructor call, changed in commit
I082152b64141f1a.
The parent constructor calls getIndexField(), which depends on the
mSort value already being set.
Bug: T231261
Change-Id: If07f10075a51fbbe9de24464cb6844faaad94780
protected $mCurrentRow;
public function __construct( IContextSource $context = null, LinkRenderer $linkRenderer = null ) {
protected $mCurrentRow;
public function __construct( IContextSource $context = null, LinkRenderer $linkRenderer = null ) {
- parent::__construct( $context, $linkRenderer );
-
$this->mSort = $this->getRequest()->getText( 'sort' );
if ( !array_key_exists( $this->mSort, $this->getFieldNames() )
|| !$this->isFieldSortable( $this->mSort )
$this->mSort = $this->getRequest()->getText( 'sort' );
if ( !array_key_exists( $this->mSort, $this->getFieldNames() )
|| !$this->isFieldSortable( $this->mSort )
} elseif ( $this->getRequest()->getBool( 'desc' ) ) {
$this->mDefaultDirection = IndexPager::DIR_DESCENDING;
} /* Else leave it at whatever the class default is */
} elseif ( $this->getRequest()->getBool( 'desc' ) ) {
$this->mDefaultDirection = IndexPager::DIR_DESCENDING;
} /* Else leave it at whatever the class default is */
+
+ // Parent constructor needs mSort set, so we call it last
+ parent::__construct( $context, $linkRenderer );