X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpager%2FTablePager.php;h=ea619f1a72f3e20368c0118a3cc1c48b48129921;hb=59ebff658ce912c1b0e7ef8d8f9bfec5a4e17b39;hp=221878700de18544d9e4577f91aee1b6d32e1886;hpb=4fcdcc14aa1b4cf75355e3c94424ef4dc9dc418b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/pager/TablePager.php b/includes/pager/TablePager.php index 221878700d..ea619f1a72 100644 --- a/includes/pager/TablePager.php +++ b/includes/pager/TablePager.php @@ -42,9 +42,9 @@ abstract class TablePager extends IndexPager { $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(); @@ -128,7 +128,7 @@ abstract class TablePager extends IndexPager { 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'; @@ -233,6 +233,13 @@ abstract class TablePager extends IndexPager { } } + /** + * @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 @@ -402,13 +409,11 @@ abstract class TablePager extends IndexPager { * @return string HTML fragment */ function getLimitForm() { - global $wgScript; - return Html::rawElement( 'form', array( 'method' => 'get', - 'action' => $wgScript + 'action' => wfScript(), ), "\n" . $this->getLimitDropdown() ) . "\n";