aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáté Bartus <mate.bartus@gmail.com>2016-03-09 19:39:29 +0100
committerMáté Bartus <mate.bartus@gmail.com>2016-03-09 19:39:29 +0100
commit5e84d47a0326e9d7a83809b9fe5278fb7b9796b5 (patch)
tree27e9230e10c26ad853ff5be297304a41b58e80bb
parent7c45ed0733d525d466ba6d45a13b50e5fc553126 (diff)
parentdd115d189658974a8a6caef532c273c90f3c2ede (diff)
downloadforums-5e84d47a0326e9d7a83809b9fe5278fb7b9796b5.tar
forums-5e84d47a0326e9d7a83809b9fe5278fb7b9796b5.tar.gz
forums-5e84d47a0326e9d7a83809b9fe5278fb7b9796b5.tar.bz2
forums-5e84d47a0326e9d7a83809b9fe5278fb7b9796b5.tar.xz
forums-5e84d47a0326e9d7a83809b9fe5278fb7b9796b5.zip
Merge pull request #4205 from marc1706/ticket/13264
[ticket/13264] Do not force approved state if post visibility is known
-rw-r--r--phpBB/includes/functions_posting.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index fae8e659bb..b2713fef07 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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 .= '&amp;t=' . $data['topic_id'];