add timestamp to topic edit hook

v1.18.x
Barış Soner Uşaklı 8 years ago
parent f6d22b7ea5
commit 6a822f729d

@ -85,7 +85,7 @@ module.exports = function (Posts) {
async.parallel({ async.parallel({
topic: function (next) { topic: function (next) {
topics.getTopicFields(tid, ['cid', 'title'], next); topics.getTopicFields(tid, ['cid', 'title', 'timestamp'], next);
}, },
isMain: function (next) { isMain: function (next) {
Posts.isMain(data.pid, next); Posts.isMain(data.pid, next);
@ -136,6 +136,7 @@ module.exports = function (Posts) {
function (tags, next) { function (tags, next) {
topicData.tags = data.tags; topicData.tags = data.tags;
topicData.oldTitle = results.topic.title; topicData.oldTitle = results.topic.title;
topicData.timestamp = results.topic.timestamp;
plugins.fireHook('action:topic.edit', { topic: topicData, uid: data.uid }); plugins.fireHook('action:topic.edit', { topic: topicData, uid: data.uid });
next(null, { next(null, {
tid: tid, tid: tid,

Loading…
Cancel
Save