mirror of
https://github.com/e107inc/e107.git
synced 2025-01-19 13:37:09 +01:00
Merge pull request #3620 from SimSync/fix_3619
issue #3619: Missing moderator ids on forum move
This commit is contained in:
commit
82c5c22e57
@ -67,7 +67,17 @@ class forum_post_handler
|
||||
$this->post = (int) $_GET['post']; // post ID if needed.
|
||||
|
||||
|
||||
$moderatorUserIds = $forum->getModeratorUserIdsByPostId($this->post);
|
||||
// issue #3619: In case the post id is not set
|
||||
// use the thread id to look for the moderator ids
|
||||
if (!empty($this->post))
|
||||
{
|
||||
$moderatorUserIds = $forum->getModeratorUserIdsByPostId($this->post);
|
||||
}
|
||||
else
|
||||
{
|
||||
$moderatorUserIds = $forum->getModeratorUserIdsByThreadId($this->id);
|
||||
}
|
||||
|
||||
define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds)));
|
||||
|
||||
|
||||
@ -810,8 +820,16 @@ class forum_post_handler
|
||||
*/
|
||||
private function renderFormMove()
|
||||
{
|
||||
if (isset($_POST['forum_move']))
|
||||
{
|
||||
// Forum just moved. No need to display the forum move form again.
|
||||
return;
|
||||
}
|
||||
|
||||
if(!deftrue('MODERATOR'))
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
echo $mes->addWarning(LAN_NO_PERMISSIONS)->render();
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user