pull/1417/head
John McLear 2013-01-22 23:06:52 +00:00
parent 205d983225
commit d21585b880
2 changed files with 7 additions and 2 deletions

View File

@ -30,7 +30,7 @@ var async = require("async");
var exportHtml = require("../utils/ExportHtml"); var exportHtml = require("../utils/ExportHtml");
var importHtml = require("../utils/ImportHtml"); var importHtml = require("../utils/ImportHtml");
var cleanText = require("./Pad").cleanText; var cleanText = require("./Pad").cleanText;
var padDiff = require("../utils/padDiff"); var PadDiff = require("../utils/padDiff");
/**********************/ /**********************/
/**GROUP FUNCTIONS*****/ /**GROUP FUNCTIONS*****/
@ -611,16 +611,19 @@ exports.createDiff = function(padID, startRev, endRev, callback){
//get the pad //get the pad
getPadSafe(padID, true, function(err, pad) getPadSafe(padID, true, function(err, pad)
{ {
console.warn(padID);
if(err){ if(err){
return callback(err); return callback(err);
} }
try { try {
console.warn(pad);
var padDiff = new PadDiff(pad, startRev, endRev); var padDiff = new PadDiff(pad, startRev, endRev);
console.warn("AFTER");
} catch(e) { } catch(e) {
return callback({stop:e.message}); return callback({stop:e.message});
} }
/*
var html, authors; var html, authors;
async.series([ async.series([
@ -647,6 +650,7 @@ exports.createDiff = function(padID, startRev, endRev, callback){
], function(err){ ], function(err){
callback(err, {html: html, authors: authors}) callback(err, {html: html, authors: authors})
}); });
*/
}); });
} }

View File

@ -1,5 +1,6 @@
exports.createDiff = function(padID, startRev, endRev, callback){ exports.createDiff = function(padID, startRev, endRev, callback){
console.warn("WTF"); console.warn("WTF");
//check if rev is a number //check if rev is a number
if(startRev !== undefined && typeof startRev != "number") if(startRev !== undefined && typeof startRev != "number")
{ {