v1.18.x
barisusakli 9 years ago
parent 8fb24f26e3
commit f005231996

@ -1,6 +1,7 @@
'use strict';
var async = require('async'),
_ = require('underscore'),
meta = require('../meta'),
db = require('../database'),
@ -91,7 +92,7 @@ module.exports = function(Posts) {
});
},
function(postData, next) {
plugins.fireHook('action:post.save', postData);
plugins.fireHook('action:post.save', _.clone(postData));
next(null, postData);
}
], callback);

@ -1,6 +1,8 @@
'use strict';
var async = require('async'),
_ = require('underscore'),
db = require('../database'),
topics = require('../topics'),
user = require('../user'),
@ -59,7 +61,7 @@ module.exports = function(Posts) {
},
function(cid, next) {
postData.cid = cid;
plugins.fireHook('action:post.restore', postData);
plugins.fireHook('action:post.restore', _.clone(postData));
async.parallel([
function(next) {

@ -32,7 +32,9 @@ module.exports = function(Topics) {
db.sortedSetRemove('cid:' + topicData.cid + ':pids', pids, next);
});
}
], callback);
], function(err, results) {
callback(err);
});
});
};
@ -77,7 +79,9 @@ module.exports = function(Topics) {
});
});
}
], callback);
], function(err, results) {
callback(err);
});
});
};

@ -61,7 +61,7 @@ module.exports = function(Topics) {
uid: uid
};
callback(null, data);
next(null, data);
}
], callback);
}

Loading…
Cancel
Save