class DeletedContribsPager extends IndexPager {
+ /**
+ * @var bool Default direction for pager
+ */
public $mDefaultDirection = IndexPager::DIR_DESCENDING;
+
+ /**
+ * @var string[] Local cache for escaped messages
+ */
public $messages;
+
+ /**
+ * @var string User name, or a string describing an IP address range
+ */
public $target;
+
+ /**
+ * @var string|int A single namespace number, or an empty string for all namespaces
+ */
public $namespace = '';
+
+ /**
+ * @var \Wikimedia\Rdbms\Database
+ */
public $mDb;
/**
*
* @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 ) {
- $data = [ parent::reallyDoQuery( $offset, $limit, $descending ) ];
+ function reallyDoQuery( $offset, $limit, $order ) {
+ $data = [ parent::reallyDoQuery( $offset, $limit, $order ) ];
// This hook will allow extensions to add in additional queries, nearly
// identical to ContribsPager::reallyDoQuery.
Hooks::run(
'DeletedContribsPager::reallyDoQuery',
- [ &$data, $this, $offset, $limit, $descending ]
+ [ &$data, $this, $offset, $limit, $order ]
);
$result = [];
}
// sort results
- if ( $descending ) {
+ if ( $order === self::QUERY_ASCENDING ) {
ksort( $result );
} else {
krsort( $result );
return 'ar_timestamp';
}
+ /**
+ * @return string
+ */
+ public function getTarget() {
+ return $this->target;
+ }
+
+ /**
+ * @return int|string
+ */
+ public function getNamespace() {
+ return $this->namespace;
+ }
+
protected function getStartBody() {
return "<ul>\n";
}