summaryrefslogtreecommitdiff
path: root/src/node/db
diff options
context:
space:
mode:
authorwebzwo0i <webzwo0i@c3d2.de>2014-12-14 22:01:28 +0100
committerwebzwo0i <webzwo0i@c3d2.de>2014-12-14 22:01:28 +0100
commit5d15f655f0d697995e221c19e707fc9ff05faaa2 (patch)
tree19e9a6a44d2a8c808766f45516b986d2f8a6e5a7 /src/node/db
parent1932d240e5689370ab4cee4374ff3c198807d9d6 (diff)
downloadetherpad-lite-5d15f655f0d697995e221c19e707fc9ff05faaa2.zip
dont make local variables global
Diffstat (limited to 'src/node/db')
-rw-r--r--src/node/db/API.js6
-rw-r--r--src/node/db/Pad.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/node/db/API.js b/src/node/db/API.js
index 4a912368..2f6542e4 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] != "")
{