Merge pull request #2373 from webzwo0i/avoid-global-vairables

dont make local variables global
This commit is contained in:
John McLear 2014-12-16 00:41:41 +00:00
commit cfa3f15f94
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] != "")
{