diff options
author | John McLear <john@mclear.co.uk> | 2014-12-16 00:41:41 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2014-12-16 00:41:41 +0000 |
commit | cfa3f15f94e7e38dcb7dda9a5224416ee409b41a (patch) | |
tree | f26ad9b4c4445f988078a6cebd909f8495e8b0db /src/node/db | |
parent | e57c8fa763d231b2bf97dcfe62425ed5a42cd7b9 (diff) | |
parent | 5d15f655f0d697995e221c19e707fc9ff05faaa2 (diff) | |
download | etherpad-lite-cfa3f15f94e7e38dcb7dda9a5224416ee409b41a.zip |
Merge pull request #2373 from webzwo0i/avoid-global-vairables
dont make local variables global
Diffstat (limited to 'src/node/db')
-rw-r--r-- | src/node/db/API.js | 6 | ||||
-rw-r--r-- | src/node/db/Pad.js | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/node/db/API.js b/src/node/db/API.js index 07d3703c..a9df2a12 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -263,7 +263,7 @@ exports.getText = function(padID, rev, callback) { if(ERR(err, callback)) return; - data = {text: atext.text}; + var data = {text: atext.text}; callback(null, data); }) @@ -368,7 +368,7 @@ exports.getHTML = function(padID, rev, callback) if(ERR(err, callback)) return; html = "<!DOCTYPE HTML><html><body>" +html; // adds HTML head html += "</body></html>"; - data = {html: html}; + var data = {html: html}; callback(null, data); }); } @@ -380,7 +380,7 @@ exports.getHTML = function(padID, rev, callback) if(ERR(err, callback)) return; html = "<!DOCTYPE HTML><html><body>" +html; // adds HTML head html += "</body></html>"; - data = {html: html}; + var data = {html: html}; callback(null, data); }); } diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js index 4670696a..2791334b 100644 --- a/src/node/db/Pad.js +++ b/src/node/db/Pad.js @@ -135,7 +135,7 @@ Pad.prototype.getRevisionDate = function getRevisionDate(revNum, callback) { Pad.prototype.getAllAuthors = function getAllAuthors() { var authors = []; - for(key in this.pool.numToAttrib) + for(var key in this.pool.numToAttrib) { if(this.pool.numToAttrib[key][0] == "author" && this.pool.numToAttrib[key][1] != "") { |