Fix PageImages support for MediaWiki 1.38+ (#63)

This commit is contained in:
Universal Omega 2022-03-11 13:50:45 -07:00 committed by GitHub
parent fffbcaac5e
commit c901aa9be1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,6 +100,17 @@ class MediaWikiParserService implements ExternalParser {
ParserFileProcessingHookHandlers::onParserMakeImageParams(
$title, $file, $params, $this->parser
);
} elseif ( method_exists(
ParserFileProcessingHookHandlers::class, 'onParserModifyImageHTML'
) ) {
// 1.38+
$params = [];
$html = '';
// @phan-suppress-next-line PhanUndeclaredStaticMethod
ParserFileProcessingHookHandlers::onParserModifyImageHTML(
$this->parser, $file, $params, $html
);
}
}
}