merged composer and some other files with master

This commit is contained in:
akhoury
2014-02-20 02:25:15 -05:00
118 changed files with 913 additions and 423 deletions

View File

@@ -139,6 +139,7 @@ var async = require('async'),
Topics.reply = function(tid, uid, content, callback) {
var privileges;
var postData;
async.waterfall([
function(next) {
@@ -165,30 +166,29 @@ var async = require('async'),
posts.create(uid, tid, content, next);
},
function(postData, next) {
function(data, next) {
postData = data;
threadTools.notifyFollowers(tid, postData.pid, uid);
user.sendPostNotificationToFollowers(uid, tid, postData.pid);
next(null, postData);
next();
},
function(postData, next) {
Topics.markAsUnreadForAll(tid, function(err) {
if(err) {
return next(err);
}
Topics.markAsRead(tid, uid, function(err) {
Topics.pushUnreadCount(null);
next(err, postData);
});
});
function(next) {
Topics.markAsUnreadForAll(tid, next);
},
function(postData, next) {
function(next) {
Topics.markAsRead(tid, uid, next);
},
function(next) {
Topics.pushUnreadCount();
posts.addUserInfoToPost(postData, next);
},
function(postData, next) {
function(postData,next) {
posts.getPidIndex(postData.pid, next);
},
function(index, next) {
postData.index = index;
postData.favourited = false;
postData.votes = 0;
postData.display_moderator_tools = true;
@@ -293,7 +293,7 @@ var async = require('async'),
}
if(data) {
data.title = validator.sanitize(data.title).escape();
data.title = validator.escape(data.title);
data.relativeTime = utils.toISOString(data.timestamp);
}