X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=includes%2Fspecials%2Fpagers%2FContribsPager.php;h=626fc48c00876fbe0c102d852d8a47061ab22edb;hb=b10d412c3a7c5b47bb160185488745a1c49f6b01;hp=ca13f3de8554c91cb5cc2f51ffe87f4044eb4b06;hpb=83df75a464c05b3a4b4c7e7273d3fa6b260105d7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/pagers/ContribsPager.php b/includes/specials/pagers/ContribsPager.php index ca13f3de85..626fc48c00 100644 --- a/includes/specials/pagers/ContribsPager.php +++ b/includes/specials/pagers/ContribsPager.php @@ -154,20 +154,33 @@ class ContribsPager extends RangeChronologicalPager { return $query; } + /** + * Wrap the navigation bar in a p element with identifying class. + * In future we may want to change the `p` tag to a `div` and upstream + * this to the parent class. + * + * @return string HTML + */ + function getNavigationBar() { + return Html::rawElement( 'p', [ 'class' => 'mw-pager-navigation-bar' ], + parent::getNavigationBar() + ); + } + /** * This method basically executes the exact same code as the parent class, though with * a hook added, to allow extensions to add additional queries. * * @param string $offset Index offset, inclusive * @param int $limit Exact query limit - * @param bool $descending Query direction, false for ascending, true for descending + * @param bool $order IndexPager::QUERY_ASCENDING or IndexPager::QUERY_DESCENDING * @return IResultWrapper */ - function reallyDoQuery( $offset, $limit, $descending ) { + function reallyDoQuery( $offset, $limit, $order ) { list( $tables, $fields, $conds, $fname, $options, $join_conds ) = $this->buildQueryInfo( $offset, $limit, - $descending + $order ); /* @@ -193,7 +206,7 @@ class ContribsPager extends RangeChronologicalPager { ) ]; Hooks::run( 'ContribsPager::reallyDoQuery', - [ &$data, $this, $offset, $limit, $descending ] + [ &$data, $this, $offset, $limit, $order ] ); $result = []; @@ -207,7 +220,7 @@ class ContribsPager extends RangeChronologicalPager { } // sort results - if ( $descending ) { + if ( $order === self::QUERY_ASCENDING ) { ksort( $result ); } else { krsort( $result ); @@ -421,6 +434,41 @@ class ContribsPager extends RangeChronologicalPager { return 'rev_timestamp'; } + /** + * @return false|string + */ + public function getTagFilter() { + return $this->tagFilter; + } + + /** + * @return string + */ + public function getContribs() { + return $this->contribs; + } + + /** + * @return string + */ + public function getTarget() { + return $this->target; + } + + /** + * @return bool + */ + public function isNewOnly() { + return $this->newOnly; + } + + /** + * @return int|string + */ + public function getNamespace() { + return $this->namespace; + } + /** * @return string[] */