dont make local variables global

This commit is contained in:
webzwo0i 2014-12-14 22:01:28 +01:00
parent 1932d240e5
commit 5d15f655f0
11 changed files with 14 additions and 14 deletions

View file

@ -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);
});
}

View file

@ -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] != "")
{