From 69ed00fc14f2d7475c469500ce5a6d80b1beedc6 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 7 Nov 2014 17:50:16 -0500 Subject: [PATCH] added mainPid to topic restore/edit hooks --- src/postTools.js | 1 + src/threadTools.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/postTools.js b/src/postTools.js index c9f51b07c3..0e8d3934ce 100644 --- a/src/postTools.js +++ b/src/postTools.js @@ -68,6 +68,7 @@ var winston = require('winston'), var topicData = { tid: tid, + mainPid: pid, title: title, slug: tid + '/' + utils.slugify(title) }; diff --git a/src/threadTools.js b/src/threadTools.js index b6609b6046..e311b65cd4 100644 --- a/src/threadTools.js +++ b/src/threadTools.js @@ -32,7 +32,7 @@ var winston = require('winston'), }; function toggleDelete(tid, uid, isDelete, callback) { - topics.getTopicFields(tid, ['tid', 'cid', 'deleted', 'title'], function(err, topicData) { + topics.getTopicFields(tid, ['tid', 'cid', 'deleted', 'title', 'mainPid'], function(err, topicData) { if (err) { return callback(err); }