Merge "Update Hook call"

This commit is contained in:
jenkins-bot 2015-04-27 13:01:26 +00:00 committed by Gerrit Code Review
commit 6b62c5d7d7
2 changed files with 6 additions and 5 deletions

View file

@ -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' ) );
}

View file

@ -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();