mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 22:27:34 +02:00
issue #3619: Missing moderator ids on forum move
In case the post id is not set use the thread id to look for the moderator ids
This commit is contained in:
@@ -67,7 +67,17 @@ class forum_post_handler
|
|||||||
$this->post = (int) $_GET['post']; // post ID if needed.
|
$this->post = (int) $_GET['post']; // post ID if needed.
|
||||||
|
|
||||||
|
|
||||||
|
// issue #3619: In case the post id is not set
|
||||||
|
// use the thread id to look for the moderator ids
|
||||||
|
if (isset($this->post))
|
||||||
|
{
|
||||||
$moderatorUserIds = $forum->getModeratorUserIdsByPostId($this->post);
|
$moderatorUserIds = $forum->getModeratorUserIdsByPostId($this->post);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$moderatorUserIds = $forum->getModeratorUserIdsByThreadId($this->id);
|
||||||
|
}
|
||||||
|
|
||||||
define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds)));
|
define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds)));
|
||||||
|
|
||||||
|
|
||||||
@@ -802,8 +812,17 @@ class forum_post_handler
|
|||||||
*/
|
*/
|
||||||
private function renderFormMove()
|
private function renderFormMove()
|
||||||
{
|
{
|
||||||
|
if (isset($_POST['forum_move']))
|
||||||
|
{
|
||||||
|
// Forum just moved. No need to display the forum move form again.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!deftrue('MODERATOR'))
|
if(!deftrue('MODERATOR'))
|
||||||
{
|
{
|
||||||
|
// todo: LAN for new error message
|
||||||
|
$mes = e107::getMessage();
|
||||||
|
echo $mes->addWarning('You do not have access to this area!')->render();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user