<?php
/**
- *
- *
- * Created on July 30, 2007
- *
* Copyright © 2007 Roan Kattouw "<Firstname>.<Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
}
$this->tokenFunctions = [
- 'userrights' => [ 'ApiQueryUsers', 'getUserrightsToken' ],
+ 'userrights' => [ self::class, 'getUserrightsToken' ],
];
Hooks::run( 'APIQueryUsersTokens', [ &$this->tokenFunctions ] );
public function execute() {
$db = $this->getDB();
- $commentStore = new CommentStore( 'ipb_reason' );
+ $commentStore = CommentStore::getStore();
$params = $this->extractRequestParams();
$this->requireMaxOneParameter( $params, 'userids', 'users' );
$data[$key]['blockedby'] = $row->ipb_by_text;
$data[$key]['blockedbyid'] = (int)$row->ipb_by;
$data[$key]['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $row->ipb_timestamp );
- $data[$key]['blockreason'] = $commentStore->getComment( $row )->text;
+ $data[$key]['blockreason'] = $commentStore->getComment( 'ipb_reason', $row )
+ ->text;
$data[$key]['blockexpiry'] = $row->ipb_expiry;
}