diff --git a/Quests/includes/Hooks.php b/Quests/includes/Hooks.php index 1e3c249..3d2f6ee 100644 --- a/Quests/includes/Hooks.php +++ b/Quests/includes/Hooks.php @@ -4,7 +4,7 @@ namespace Isekai\UserPoints\Quests; use MediaWiki\MediaWikiServices; use MediaWiki\Session\SessionManager; -use OutputPage; +use MediaWiki\Output\OutputPage; class Hooks { /** diff --git a/Quests/includes/QuestsUtils.php b/Quests/includes/QuestsUtils.php index 693ec41..d14e134 100644 --- a/Quests/includes/QuestsUtils.php +++ b/Quests/includes/QuestsUtils.php @@ -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; diff --git a/includes/Api/ApiQueryUserPoints.php b/includes/Api/ApiQueryUserPoints.php index 96191bf..a6082f2 100644 --- a/includes/Api/ApiQueryUserPoints.php +++ b/includes/Api/ApiQueryUserPoints.php @@ -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; diff --git a/includes/Api/ApiQueryUsersPoints.php b/includes/Api/ApiQueryUsersPoints.php index c3e56a2..889609a 100644 --- a/includes/Api/ApiQueryUsersPoints.php +++ b/includes/Api/ApiQueryUsersPoints.php @@ -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() ], diff --git a/includes/Api/ApiUserDailySign.php b/includes/Api/ApiUserDailySign.php index 40cca44..e202438 100644 --- a/includes/Api/ApiUserDailySign.php +++ b/includes/Api/ApiUserDailySign.php @@ -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; diff --git a/includes/Hooks.php b/includes/Hooks.php index c0ebfb3..90cf770 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -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 { /** diff --git a/includes/Service/IsekaiUserDailySign.php b/includes/Service/IsekaiUserDailySign.php index ef1ad30..b0ec872 100644 --- a/includes/Service/IsekaiUserDailySign.php +++ b/includes/Service/IsekaiUserDailySign.php @@ -2,7 +2,7 @@ namespace Isekai\UserPoints\Service; use stdClass; -use User; +use MediaWiki\User\User; use MediaWiki\MediaWikiServices; /** diff --git a/includes/Service/IsekaiUserDailySignFactory.php b/includes/Service/IsekaiUserDailySignFactory.php index 897b746..e4ab4df 100644 --- a/includes/Service/IsekaiUserDailySignFactory.php +++ b/includes/Service/IsekaiUserDailySignFactory.php @@ -1,8 +1,8 @@