Update for MediaWiki 1.42.0

master
落雨楓 1 month ago
parent 9aad5ec459
commit 3284475efa

@ -4,7 +4,7 @@ namespace Isekai\UserPoints\Quests;
use MediaWiki\MediaWikiServices;
use MediaWiki\Session\SessionManager;
use OutputPage;
use MediaWiki\Output\OutputPage;
class Hooks {
/**

@ -3,7 +3,7 @@
namespace Isekai\UserPoints\Quests;
use MediaWiki\MediaWikiServices;
use User;
use MediaWiki\User\User;
use Isekai\UserPoints\Service\IsekaiUserPointsFactory;
use Isekai\UserPoints\Utils;

@ -3,7 +3,7 @@ namespace Isekai\UserPoints\Api;
use ApiQueryBase;
use ApiQuery;
use Config;
use MediaWiki\Config\Config;
use MediaWiki\MediaWikiServices;
use WANObjectCache;
use Isekai\UserPoints\Service\IsekaiUserPointsFactory;

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

@ -2,7 +2,6 @@
namespace Isekai\UserPoints\Api;
use ApiBase;
use Isekai\UserPoints\Service\IsekaiUserPointsFactory;
use Isekai\UserPoints\Service\IsekaiUserDailySignFactory;
use Isekai\UserPoints\Utils;
use MediaWiki\MediaWikiServices;

@ -2,13 +2,13 @@
namespace Isekai\UserPoints;
use DatabaseUpdater;
use DateTime;
use DateTimeZone;
use MediaWiki\MediaWikiServices;
use OutputPage;
use MediaWiki\Output\OutputPage;
use MediaWiki\User\User;
use MediaWiki\Installer\DatabaseUpdater;
use Skin;
use User;
class Hooks {
/**

@ -2,7 +2,7 @@
namespace Isekai\UserPoints\Service;
use stdClass;
use User;
use MediaWiki\User\User;
use MediaWiki\MediaWikiServices;
/**

@ -1,8 +1,8 @@
<?php
namespace Isekai\UserPoints\Service;
use Config;
use User;
use MediaWiki\Config\Config;
use MediaWiki\User\User;
use MediaWiki\MediaWikiServices;
class IsekaiUserDailySignFactory {

@ -2,7 +2,7 @@
namespace Isekai\UserPoints\Service;
use Isekai\UserPoints\Utils;
use User;
use MediaWiki\User\User;
use stdClass;
use MediaWiki\MediaWikiServices;

@ -2,7 +2,7 @@
namespace Isekai\UserPoints\Service;
use MediaWiki\MediaWikiServices;
use User;
use MediaWiki\User\User;
class IsekaiUserPointsFactory {
/** @var MediaWikiServices */
@ -67,7 +67,7 @@ class IsekaiUserPointsFactory {
}
/**
* @return array{0: User, 1: string, 2: IsekaiUserPoints} (user, instance)
* @return array{User, string, IsekaiUserPoints}[]
*/
public function newFromUsers(array $users, array $pointTypes) {
$userids = [];

@ -1,7 +1,7 @@
<?php
namespace Isekai\UserPoints;
use Html;
use MediaWiki\Html\Html;
use MediaWiki\MediaWikiServices;
class Utils {

Loading…
Cancel
Save