From d21585b8807b831e51a689bab6769d0ebfc1544b Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 22 Jan 2013 23:06:52 +0000 Subject: [PATCH] mheh --- src/node/db/API.js | 8 ++++++-- src/node/utils/padDiff.js | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/node/db/API.js b/src/node/db/API.js index 72ca16328..50c4a6c5d 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -30,7 +30,7 @@ var async = require("async"); var exportHtml = require("../utils/ExportHtml"); var importHtml = require("../utils/ImportHtml"); var cleanText = require("./Pad").cleanText; -var padDiff = require("../utils/padDiff"); +var PadDiff = require("../utils/padDiff"); /**********************/ /**GROUP FUNCTIONS*****/ @@ -611,16 +611,19 @@ exports.createDiff = function(padID, startRev, endRev, callback){ //get the pad getPadSafe(padID, true, function(err, pad) { +console.warn(padID); if(err){ return callback(err); } try { +console.warn(pad); var padDiff = new PadDiff(pad, startRev, endRev); +console.warn("AFTER"); } catch(e) { return callback({stop:e.message}); } - +/* var html, authors; async.series([ @@ -647,6 +650,7 @@ exports.createDiff = function(padID, startRev, endRev, callback){ ], function(err){ callback(err, {html: html, authors: authors}) }); + */ }); } diff --git a/src/node/utils/padDiff.js b/src/node/utils/padDiff.js index 230668eb3..645c2e2d4 100644 --- a/src/node/utils/padDiff.js +++ b/src/node/utils/padDiff.js @@ -1,5 +1,6 @@ exports.createDiff = function(padID, startRev, endRev, callback){ console.warn("WTF"); + //check if rev is a number if(startRev !== undefined && typeof startRev != "number") {