1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Merge pull request #4730 from Jimmi08/master

Closes #4659 forum main admin as silent moderator
This commit is contained in:
Cameron 2022-04-01 10:57:58 -07:00 committed by GitHub
commit 33d87efd20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

View File

@ -535,7 +535,7 @@ class e107forum
}
// Check if user has moderator permissions for this thread
if(!in_array(USERID, $moderatorUserIds))
if(!in_array(USERID, $moderatorUserIds) && !getperms('0'))
{
$ret['msg'] = ''.LAN_FORUM_8030.'';
$ret['hide'] = false;

View File

@ -80,7 +80,7 @@ class forum_post_handler
$moderatorUserIds = $forum->getModeratorUserIdsByThreadId($this->id);
}
define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds)));
define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds) || getperms('0')));
$this->data = $this->processGet();

View File

@ -234,7 +234,7 @@ function init()
}
$moderatorUserIds = $forum->getModeratorUserIdsByForumId($forumId);
define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds)));
define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds) || getperms('0')));
if(MODERATOR)
{

View File

@ -86,8 +86,7 @@ $thread->init();
/* Check if use has moderator permissions for this thread */
$moderatorUserIds = $forum->getModeratorUserIdsByThreadId($thread->threadInfo['thread_id']);
define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds)));
define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds) || getperms('0') ));
if(e_AJAX_REQUEST)
{