From e052d8e5c1c36963260670c934832d7d2b01edef Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 10 Oct 2014 15:44:02 -0400 Subject: [PATCH] log topic move --- src/events.js | 4 ++++ src/threadTools.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/events.js b/src/events.js index f7cf1a10c4..37e43f3d01 100644 --- a/src/events.js +++ b/src/events.js @@ -62,6 +62,10 @@ var fs = require('fs'), events.logWithUser(uid, 'restored post (pid ' + pid + ')'); }; + events.logTopicMove = function(uid, tid) { + events.logWithUser(uid, 'moved topic (tid ' + tid + ')'); + }; + events.logTopicDelete = function(uid, tid) { events.logWithUser(uid, 'deleted topic (tid ' + tid + ')'); }; diff --git a/src/threadTools.js b/src/threadTools.js index 1e69868e62..22ceeafa07 100644 --- a/src/threadTools.js +++ b/src/threadTools.js @@ -207,6 +207,8 @@ var winston = require('winston'), topics.setTopicField(tid, 'cid', cid, callback); + events.logTopicMove(uid, tid); + plugins.fireHook('action:topic.move', { tid: tid, fromCid: oldCid,