$this->mSort = $this->getDefaultSort();
}
if ( $this->getRequest()->getBool( 'asc' ) ) {
- $this->mDefaultDirection = false;
+ $this->mDefaultDirection = IndexPager::DIR_ASCENDING;
} elseif ( $this->getRequest()->getBool( 'desc' ) ) {
- $this->mDefaultDirection = true;
+ $this->mDefaultDirection = IndexPager::DIR_DESCENDING;
} /* Else leave it at whatever the class default is */
parent::__construct();
if ( $this->mSort == $field ) {
// The table is sorted by this field already, make a link to sort in the other direction
// We don't actually know in which direction other fields will be sorted by default…
- if ( $this->mDefaultDirection ) {
+ if ( $this->mDefaultDirection == IndexPager::DIR_DESCENDING ) {
$linkType = 'asc';
$class = "$sortClass TablePager_sort-descending";
$query['asc'] = '1';
}
}
+ /**
+ * @return stdClass
+ */
+ protected function getCurrentRow() {
+ return $this->mCurrentRow;
+ }
+
/**
* Get any extra attributes to be applied to the given cell. Don't
* take this as an excuse to hardcode styles; use classes and
* @return string HTML fragment
*/
function getLimitForm() {
- global $wgScript;
-
return Html::rawElement(
'form',
array(
'method' => 'get',
- 'action' => $wgScript
+ 'action' => wfScript(),
),
"\n" . $this->getLimitDropdown()
) . "\n";