mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #4205 from marc1706/ticket/13264
[ticket/13264] Do not force approved state if post visibility is known
This commit is contained in:
commit
5e84d47a03
1 changed files with 7 additions and 1 deletions
|
@ -1636,6 +1636,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if (isset($data['post_visibility']) && $data['post_visibility'] !== false)
|
||||
{
|
||||
$post_visibility = $data['post_visibility'];
|
||||
}
|
||||
|
||||
// MODs/Extensions are able to force any visibility on posts
|
||||
if (isset($data['force_approved_state']))
|
||||
|
@ -2429,7 +2433,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
|
||||
$params = $add_anchor = '';
|
||||
|
||||
if ($post_visibility == ITEM_APPROVED)
|
||||
if ($post_visibility == ITEM_APPROVED ||
|
||||
($auth->acl_get('m_softdelete', $data['forum_id']) && $post_visibility == ITEM_DELETED) ||
|
||||
($auth->acl_get('m_approve', $data['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
|
||||
{
|
||||
$params .= '&t=' . $data['topic_id'];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue