mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-23 15:57:10 +00:00
Fix PageImages compatibility with MediaWiki 1.40 (#102)
This commit is contained in:
parent
2d13828e2c
commit
98d4e900af
|
@ -85,7 +85,9 @@ class MediaWikiParserService implements ExternalParser {
|
|||
* @param Title $title
|
||||
*/
|
||||
public function addImage( $title ) {
|
||||
$repoGroup = MediaWikiServices::getInstance()->getRepoGroup();
|
||||
$services = MediaWikiServices::getInstance();
|
||||
|
||||
$repoGroup = $services->getRepoGroup();
|
||||
|
||||
$file = $repoGroup->findFile( $title );
|
||||
$tmstmp = $file ? $file->getTimestamp() : null;
|
||||
|
@ -96,7 +98,12 @@ class MediaWikiParserService implements ExternalParser {
|
|||
if ( method_exists(
|
||||
ParserFileProcessingHookHandlers::class, 'onParserModifyImageHTML'
|
||||
) ) {
|
||||
$handler = new ParserFileProcessingHookHandlers();
|
||||
// @phan-suppress-next-line PhanParamTooMany
|
||||
$handler = new ParserFileProcessingHookHandlers(
|
||||
$repoGroup,
|
||||
$services->getMainWANObjectCache(),
|
||||
$services->getHttpRequestFactory()
|
||||
);
|
||||
|
||||
$params = [];
|
||||
$html = '';
|
||||
|
|
Loading…
Reference in a new issue