Hello GWicke,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: Add log entry
......................................................................

Add log entry

If $wgMathDebug is set the math extension, expects
a debug value to be set.
---
M mathoid-worker.js
1 file changed, 12 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid 
refs/changes/00/150800/1

diff --git a/mathoid-worker.js b/mathoid-worker.js
index 9a0a0e3..601e187 100644
--- a/mathoid-worker.js
+++ b/mathoid-worker.js
@@ -82,26 +82,27 @@
 });
 
 
-
 function handleRequest(req, res, q, type) {
-       var mml =true;
+       var mml = true;
        //Keep format variables constant
-       if(type == "tex"){
+       if (type == "tex") {
                type = "TeX"
        }
-       if(type == "mml" || type == "MathML"){
+       if (type == "mml" || type == "MathML") {
                type = "MathML"
                mml = false;
        }
-       if(type == "ascii" || type == "asciimath" ){
+       if (type == "ascii" || type == "asciimath") {
                type = "AsciiMath"
-       }       
-       mjAPI.typeset({math:q, format:type, svg:true, img:true, mml:mml}, 
function (data) {
-               if(data.errors){
+       }
+       mjAPI.typeset({math: q, format: type, svg: true, img: true, mml: mml}, 
function (data) {
+               if (data.errors) {
                        data.success = false;
+                       data.log = "Error:" + JSON.stringify(data.errors);
                } else {
                        data.success = true;
-               }       
+                       data.log = "success";
+               }
                var jsonData = JSON.stringify(data);
                errBuf = new Buffer(jsonData);
                res.writeHead(200,
@@ -112,8 +113,8 @@
                res.end(errBuf);
 
                requestQueue.shift();
-               handleRequests();//*/
-});
+               handleRequests();
+       });
 }
 
 handleRequests = function() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice1e6dbf786ed9af53a05dc740c93738f6b30bfa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mathoid
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <w...@physikerwelt.de>
Gerrit-Reviewer: GWicke <gwi...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to