diff options
author | John McLear <john@mclear.co.uk> | 2013-03-05 13:39:53 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-03-05 13:39:53 +0000 |
commit | cb2d148734a797636778d92237a736b659bae474 (patch) | |
tree | 6c63f0e5c4fae215946bbd79dc898383bb8417ee /src/node/db/API.js | |
parent | 7a0ad3235a5d97a4a4c0a677bd480da7bfac0721 (diff) | |
parent | 2b5cb2989c3cee71ee10955bb5ff08a253ec66af (diff) | |
download | etherpad-lite-cb2d148734a797636778d92237a736b659bae474.zip |
Merge branch 'release/1.2.8'
Diffstat (limited to 'src/node/db/API.js')
-rw-r--r-- | src/node/db/API.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/node/db/API.js b/src/node/db/API.js index f99a43af..3955d495 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -253,9 +253,7 @@ exports.getHTML = function(padID, rev, callback) exportHtml.getPadHTML(pad, undefined, function (err, html) { if(ERR(err, callback)) return; - data = {html: html}; - callback(null, data); }); } @@ -325,17 +323,17 @@ exports.getChatHistory = function(padID, start, end, callback) if(!start || !end) { start = 0; - end = pad.chatHead - 1; + end = pad.chatHead; } - if(start >= chatHead) + if(start >= chatHead && chatHead > 0) { callback(new customError("start is higher or equal to the current chatHead","apierror")); return; } - if(end >= chatHead) + if(end > chatHead) { - callback(new customError("end is higher or equal to the current chatHead","apierror")); + callback(new customError("end is higher than the current chatHead","apierror")); return; } |