Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/174369
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/69/174369/1 diff --git a/MathLaTeXML.php b/MathLaTeXML.php index 4f40474..e8eaa62 100644 --- a/MathLaTeXML.php +++ b/MathLaTeXML.php @@ -201,8 +201,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 d7dd222..6cc8b5e 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/174369 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: debug Gerrit-Owner: Physikerwelt <w...@physikerwelt.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits