diff --git a/.phan/config.php b/.phan/config.php index 72f72877..f6754181 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -3,9 +3,8 @@ $cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php'; $cfg['suppress_issue_types'] = [ + 'PhanAccessMethodInternal', 'SecurityCheck-LikelyFalsePositive', - // Different versions of MediaWiki will need different suppressions. - 'UnusedPluginSuppression' ]; return $cfg; diff --git a/includes/DataDumpPager.php b/includes/DataDumpPager.php index 26f56c71..b2e60179 100644 --- a/includes/DataDumpPager.php +++ b/includes/DataDumpPager.php @@ -258,7 +258,7 @@ public function onGenerate( array $params ) { Html::element( 'p', [], - $this->msg( 'datadump-type-invalid' )->escaped() + $this->msg( 'datadump-type-invalid' )->text() ), 'mw-notify-error' ) @@ -310,7 +310,7 @@ public function onGenerate( array $params ) { Html::element( 'p', [], - $this->msg( 'datadump-generated-success' )->escaped() + $this->msg( 'datadump-generated-success' )->text() ), 'mw-notify-success' ) @@ -323,7 +323,7 @@ public function onGenerate( array $params ) { Html::element( 'p', [], - $this->msg( 'datadump-type-invalid' )->escaped() + $this->msg( 'datadump-type-invalid' )->text() ), 'mw-notify-error' ) @@ -355,7 +355,7 @@ private function getGenerateLimit( string $type ) { Html::element( 'p', [], - $this->msg( 'datadump-generated-error', $limit )->escaped() + $this->msg( 'datadump-generated-error', $limit )->text() ), 'mw-notify-error' ) diff --git a/includes/api/ApiDeleteDumps.php b/includes/api/ApiDeleteDumps.php index 2bec9b18..b188eb0e 100644 --- a/includes/api/ApiDeleteDumps.php +++ b/includes/api/ApiDeleteDumps.php @@ -31,13 +31,7 @@ public function execute() { $this->dieBlocked( $user->getBlock() ); } - // @phan-suppress-next-line PhanDeprecatedFunction Only for MW 1.39 or lower. - if ( $user->isBlockedGlobally() ) { - // @phan-suppress-next-line PhanDeprecatedFunction Only for MW 1.39 or lower. - $this->dieBlocked( $user->getGlobalBlock() ); - } - - $this->checkUserRightsAny( $perm, $user ); + $this->checkUserRightsAny( $perm ); $this->doDelete( $type, $fileName ); diff --git a/includes/api/ApiGenerateDumps.php b/includes/api/ApiGenerateDumps.php index fd471032..2666b11c 100644 --- a/includes/api/ApiGenerateDumps.php +++ b/includes/api/ApiGenerateDumps.php @@ -30,13 +30,7 @@ public function execute() { $this->dieBlocked( $user->getBlock() ); } - // @phan-suppress-next-line PhanDeprecatedFunction Only for MW 1.39 or lower. - if ( $user->isBlockedGlobally() ) { - // @phan-suppress-next-line PhanDeprecatedFunction Only for MW 1.39 or lower. - $this->dieBlocked( $user->getGlobalBlock() ); - } - - $this->checkUserRightsAny( $perm, $user ); + $this->checkUserRightsAny( $perm ); $this->doGenerate( $type ); diff --git a/includes/specials/SpecialDataDump.php b/includes/specials/SpecialDataDump.php index c0cd021f..3f5b5dc3 100644 --- a/includes/specials/SpecialDataDump.php +++ b/includes/specials/SpecialDataDump.php @@ -123,7 +123,7 @@ private function doDelete( string $type, string $fileName ) { Html::element( 'p', [], - $this->msg( 'datadump-dump-does-not-exist', $fileName )->escaped() + $this->msg( 'datadump-dump-does-not-exist', $fileName )->text() ), 'mw-notify-error' ) @@ -145,7 +145,7 @@ private function doDelete( string $type, string $fileName ) { Html::element( 'p', [], - $this->msg( 'datadump-delete-failed' )->escaped() + $this->msg( 'datadump-delete-failed' )->text() ), 'mw-notify-error' ) @@ -179,7 +179,7 @@ private function onDeleteDump( $dbw, $fileName ) { Html::element( 'p', [], - $this->msg( 'datadump-delete-success' )->escaped() + $this->msg( 'datadump-delete-success' )->text() ), 'mw-notify-success' )