Physikerwelt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/284619

Change subject: Use png image from restbase in mathml mode
......................................................................

Use png image from restbase in mathml mode

Change-Id: Iffb2a03c3aa8ed220307ef58ba13f1a38a284c5e
---
M MathObject.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch 
refs/changes/19/284619/1

diff --git a/MathObject.php b/MathObject.php
index 9db623f..8df32a8 100644
--- a/MathObject.php
+++ b/MathObject.php
@@ -421,6 +421,10 @@
        }
 
        public function getPng() {
+               if ( $this->mode == 'mathml' ){
+                       $pngUrl = preg_replace( '#/svg/#', '/png/', 
$this->getRbi()->getFullSvgUrl() );
+                       return file_get_contents( $pngUrl );
+               }
                $texvc = MathTexvc::newFromMd5( $this->getMd5() );
                $texvc->readFromDatabase();
                return $texvc->getPng();

-- 
To view, visit https://gerrit.wikimedia.org/r/284619
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffb2a03c3aa8ed220307ef58ba13f1a38a284c5e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
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

Reply via email to