Replace deprecated Hooks::run

Bug: T335536
Change-Id: I6ef724346dd82147ef22af23833c6a0af8bc9054
This commit is contained in:
Umherirrender 2023-04-27 22:51:38 +02:00
parent be27ddb2f1
commit b654cc2b0a
2 changed files with 3 additions and 4 deletions

View file

@ -2,8 +2,8 @@
namespace MediaWiki\Extension\Math;
use Hooks;
use MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
use StatusValue;
/**
@ -117,7 +117,7 @@ class MathLaTeXML extends MathMathML {
$this->setMathml( $jsonResult->result );
// Avoid PHP 7.1 warning from passing $this by reference
$renderer = $this;
Hooks::run( 'MathRenderingResultRetrieved',
MediaWikiServices::getInstance()->getHookContainer()->run( 'MathRenderingResultRetrieved',
[ &$renderer, &$jsonResult ]
); // Enables debugging of server results
return StatusValue::newGood();

View file

@ -8,7 +8,6 @@
namespace MediaWiki\Extension\Math;
use Hooks;
use Html;
use MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
@ -548,7 +547,7 @@ class MathMathML extends MathRenderer {
}
// Avoid PHP 7.1 warning from passing $this by reference
$renderer = $this;
Hooks::run( 'MathRenderingResultRetrieved',
MediaWikiServices::getInstance()->getHookContainer()->run( 'MathRenderingResultRetrieved',
[ &$renderer, &$jsonResult ]
); // Enables debugging of server results
return StatusValue::newGood(); // FIXME: empty?