mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 15:44:33 +00:00
Merge "Update Hook call"
This commit is contained in:
commit
6b62c5d7d7
|
@ -401,7 +401,13 @@ class MathTexvc extends MathRenderer {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getPng() {
|
||||
// Workaround for bugfix for Bug 56769
|
||||
if ( !isset( $wgHooks['ParserAfterParse']['FlushMathBackend'] ) ) {
|
||||
// saves the PNG-file
|
||||
Hooks::run( 'ParserAfterParse' );
|
||||
}
|
||||
$backend = $this->getBackend();
|
||||
return $backend->getFileContents( array( 'src' => $this->getHashPath() . "/" . $this->getHash() . '.png' ) );
|
||||
}
|
||||
|
|
|
@ -93,11 +93,6 @@ class SpecialMathShowImage extends SpecialPage {
|
|||
}
|
||||
if ( $success ) {
|
||||
if ( $this->mode == MW_MATH_PNG ) {
|
||||
// Workaround for bugfix for Bug 56769
|
||||
if ( !isset( $wgHooks['ParserAfterParse']['FlushMathBackend'] ) ) {
|
||||
// saves the PNG-file
|
||||
wfRunHooks('ParserAfterParse');
|
||||
}
|
||||
$output = $this->renderer->getPng();
|
||||
} else {
|
||||
$output = $this->renderer->getSvg();
|
||||
|
|
Loading…
Reference in a new issue