diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index e9f58c1de..8fc08480d 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -66,8 +66,9 @@ class forum_post_handler $this->id = (int) $_GET['id']; // forum thread/topic id. $this->post = (int) $_GET['post']; // post ID if needed. - define('MODERATOR', USER && $this->forumObj->isModerator(USERID)); + $moderatorUserIds = $forum->getModeratorUserIdsByPostId($this->post); + define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds))); $this->data = $this->processGet(); diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 85d5e5cac..c832b9e4b 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -142,8 +142,12 @@ if (USER && (USERID != $thread->threadInfo['thread_user'] || $thread->threadInfo } define('e_PAGETITLE', strip_tags($tp->toHTML($thread->threadInfo['thread_name'], true, 'no_hook, emotes_off')).' / '.$tp->toHTML($thread->threadInfo['forum_name'], true, 'no_hook, emotes_off').' / '.LAN_FORUM_1001); + $forum->modArray = $forum->forumGetMods($thread->threadInfo['forum_moderators']); -define('MODERATOR', (USER && $forum->isModerator(USERID))); + +/* Check if use has moderator permissions for this thread */ +$moderatorUserIds = $forum->getModeratorUserIdsByThreadId($thread->threadInfo['thread_id']); +define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds))); e107::getScBatch('view', 'forum')->setScVar('forum', $forum); //var_dump(e107::getScBatch('forum', 'forum'));