* @param array $conds
*/
public function __construct( $page, $conds ) {
+ parent::__construct( $page->getContext(), $page->getLinkRenderer() );
$this->conds = $conds;
$this->mDefaultDirection = IndexPager::DIR_DESCENDING;
- parent::__construct( $page->getContext() );
}
function getFieldNames() {
return $headers;
}
+ /**
+ * @param string $name
+ * @param string $value
+ * @return string
+ * @suppress PhanTypeArraySuspiciousNullable
+ */
function formatValue( $name, $value ) {
static $msg = null;
if ( $msg === null ) {
$formatted = '';
- $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+ $linkRenderer = $this->getLinkRenderer();
switch ( $name ) {
case 'ipb_timestamp':
*/
private function getRestrictionListHTML( stdClass $row ) {
$items = [];
- $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+ $linkRenderer = $this->getLinkRenderer();
foreach ( $this->restrictions as $restriction ) {
if ( $restriction->getBlockId() !== (int)$row->ipb_id ) {
function getTotalAutoblocks() {
$dbr = $this->getDatabase();
$res = $dbr->selectField( 'ipblocks',
- [ 'COUNT(*) AS totalautoblocks' ],
+ 'COUNT(*)',
[
'ipb_auto' => '1',
'ipb_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() ),