Skip to content

Node.js based forum software built for the modern web

added mainPid to topic restore/edit hooks

barisusakli69ed00fc14f2
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);
}