linting, minor bugfix, moving hiredis to optional deps

v1.18.x
Julian Lam 12 years ago
parent 2e4e94d5f8
commit 3ab7306199

@ -12,7 +12,6 @@
"dependencies": {
"socket.io": "~0.9.16",
"redis": "0.8.3",
"hiredis" : "~0.1.15",
"express": "3.2.0",
"express-namespace": "~0.1.1",
"emailjs": "0.3.4",
@ -42,6 +41,9 @@
"uglify-js": "~2.4.0",
"validator": "~1.5.1"
},
"optionalDependencies": {
"hiredis" : "~0.1.15",
},
"bugs": {
"url": "https://github.com/designcreateplay/NodeBB/issues"
},

@ -30,11 +30,13 @@ var RDB = require('./redis.js'),
callback([]);
}
});
}
};
Posts.addUserInfoToPost = function(post, callback) {
user.getUserFields(post.uid, ['username', 'userslug', 'reputation', 'postcount', 'picture', 'signature', 'banned'], function(err, userData) {
if (err) return callback();
if (err) {
return callback();
}
postTools.parse(userData.signature, function(err, signature) {
post.username = userData.username || 'anonymous';
@ -58,7 +60,7 @@ var RDB = require('./redis.js'),
}
});
});
}
};
Posts.getPostSummaryByPids = function(pids, callback) {
@ -184,7 +186,7 @@ var RDB = require('./redis.js'),
postData.uploadedImages = [];
}
postTools.toHTML(postData.content, function(err, content) {
postTools.parse(postData.content, function(err, content) {
postData.content = content;
posts.push(postData);
});

Loading…
Cancel
Save