Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/174074
Change subject: LaTeXML: prevent automatic rerendering of SVG ...................................................................... LaTeXML: prevent automatic rerendering of SVG MathMathML::renderingRequired called the getSvg function in MathLaTeXML that caused an automatic rerendering of the SVG image if it was not cached. That this rendering is triggered from the function renderingRequired is contra intutive and should be avoided. Change-Id: Ifa14f50193a05b3058624a18974c56897fcec09e --- M MathLaTeXML.php M MathMathML.php 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/74/174074/1 diff --git a/MathLaTeXML.php b/MathLaTeXML.php index 4915058..b9d7f86 100644 --- a/MathLaTeXML.php +++ b/MathLaTeXML.php @@ -197,8 +197,8 @@ * Lazy evaluation: If no SVG image exists it's generated on the fly * @return string XML-Document of the rendered SVG */ - public function getSvg() { - if ( $this->isPurge() || $this->svg == '' ) { + public function getSvg( $render = true ) { + if ( $render && ( $this->isPurge() || $this->svg == '' ) ) { $this->calulateSvg(); } return $this->svg; diff --git a/MathMathML.php b/MathMathML.php index 6707059..63f2b26 100644 --- a/MathMathML.php +++ b/MathMathML.php @@ -108,7 +108,7 @@ if ( $dbres ) { if ( $this->isValidMathML( $this->getMathml() ) ) { wfDebugLog( "Math", "Valid MathML entry found in database." ); - if ( $this->getSvg() ) { + if ( $this->getSvg( false ) ) { wfDebugLog( "Math", "SVG-fallback found in database." ); return false; } else { -- To view, visit https://gerrit.wikimedia.org/r/174074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa14f50193a05b3058624a18974c56897fcec09e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Physikerwelt <w...@physikerwelt.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits