|
|
@ -3,11 +3,10 @@ namespace Isekai\UserPoints\Api;
|
|
|
|
|
|
|
|
|
|
|
|
use ApiQueryBase;
|
|
|
|
use ApiQueryBase;
|
|
|
|
use ApiQuery;
|
|
|
|
use ApiQuery;
|
|
|
|
use Config;
|
|
|
|
use MediaWiki\Config\Config;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
use WANObjectCache;
|
|
|
|
use WANObjectCache;
|
|
|
|
use Wikimedia\ParamValidator\ParamValidator;
|
|
|
|
use Wikimedia\ParamValidator\ParamValidator;
|
|
|
|
use User;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use Isekai\UserPoints\Service\IsekaiUserPointsFactory;
|
|
|
|
use Isekai\UserPoints\Service\IsekaiUserPointsFactory;
|
|
|
|
use Isekai\UserPoints\Utils;
|
|
|
|
use Isekai\UserPoints\Utils;
|
|
|
@ -82,6 +81,10 @@ class ApiQueryUsersPoints extends ApiQueryBase {
|
|
|
|
|
|
|
|
|
|
|
|
$result = $this->getResult();
|
|
|
|
$result = $this->getResult();
|
|
|
|
foreach ($userPointsInstances as $userPointsTuple) {
|
|
|
|
foreach ($userPointsInstances as $userPointsTuple) {
|
|
|
|
|
|
|
|
if ( !$userPointsTuple ) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
list($user, $type, $userPoint) = $userPointsTuple;
|
|
|
|
list($user, $type, $userPoint) = $userPointsTuple;
|
|
|
|
$result->addValue(
|
|
|
|
$result->addValue(
|
|
|
|
[ 'query', $this->getModuleName(), "pointdata", $user->getId() ],
|
|
|
|
[ 'query', $this->getModuleName(), "pointdata", $user->getId() ],
|
|
|
|