diff --git a/includes/BlockQuoteTagHandler.php b/includes/BlockQuoteTagHandler.php index fc709ae..e02e54c 100644 --- a/includes/BlockQuoteTagHandler.php +++ b/includes/BlockQuoteTagHandler.php @@ -1,6 +1,7 @@ extTagToDOM( $extArgs, - '', $src, [ 'wrapperTag' => 'span', 'parseOpts' => [ 'extTag' => 'blockquote', ], - ], + ] ); } - public function getInnerWikitext(ParsoidExtensionAPI $extApi, \DOMElement $dom) { + public function getInnerWikitext(ParsoidExtensionAPI $extApi, Element $dom) { $wikiText = ''; foreach($dom->childNodes as $child){ if($child instanceof \DOMText){ @@ -31,7 +31,7 @@ class BlockQuoteTagHandler extends ExtensionTagHandler { return $wikiText; } - public function domToWikitext(ParsoidExtensionAPI $extApi, \DOMElement $node, bool $wrapperUnmodified): string { + public function domToWikitext(ParsoidExtensionAPI $extApi, Element $node, bool $wrapperUnmodified): string { $innerCode = $this->getInnerWikitext($extApi, $node); return "\n{$innerCode}\n"; } diff --git a/includes/Isekai.php b/includes/Isekai.php index c4b86bd..66fda91 100644 --- a/includes/Isekai.php +++ b/includes/Isekai.php @@ -3,14 +3,15 @@ namespace Isekai; use MediaWiki\MediaWikiServices; -use Config; -use OutputPage; -use Html; -use Title; +use MediaWiki\Config\Config; +use MediaWiki\Output\OutputPage; +use MediaWiki\Html\Html; +use MediaWiki\Title\Title; +use MediaWiki\User\User; +use MediaWiki\EditPage\EditPage; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkTarget; -use User; -use EditPage; +use MediaWiki\Parser\Parser; use Isekai\Job\CheckActivatedEditorJob; class Isekai { @@ -265,10 +266,10 @@ HTML } } - public static function onParserBeforeInternalParse(\Parser $parser, &$text, $strip_state) { + public static function onParserBeforeInternalParse(Parser $parser, &$text, $strip_state) { $title = $parser->getPage(); - if ($title !== null && $title instanceof \Title && $title->isSubpage()) { + if ($title !== null && $title instanceof Title && $title->isSubpage()) { //更改显示的标题 $titleText = $title->getPrefixedText(); if ($titleText) { diff --git a/includes/IsekaiChart.php b/includes/IsekaiChart.php index 38ed701..db9294a 100644 --- a/includes/IsekaiChart.php +++ b/includes/IsekaiChart.php @@ -1,7 +1,7 @@