diff options
author | Máté Bartus <mate.bartus@gmail.com> | 2016-03-09 19:43:32 +0100 |
---|---|---|
committer | Máté Bartus <mate.bartus@gmail.com> | 2016-03-09 19:43:32 +0100 |
commit | 98ea7252d385dcf1aa4ee43efad34a52247542d6 (patch) | |
tree | ca77d5c3dd3834984e92776980c7db9884d9e00e /phpBB | |
parent | 6c814ef641318fffff5815c881120a4e4e2f094d (diff) | |
parent | 0251a028960289dbc13a394842367cdff7391479 (diff) | |
download | forums-98ea7252d385dcf1aa4ee43efad34a52247542d6.tar forums-98ea7252d385dcf1aa4ee43efad34a52247542d6.tar.gz forums-98ea7252d385dcf1aa4ee43efad34a52247542d6.tar.bz2 forums-98ea7252d385dcf1aa4ee43efad34a52247542d6.tar.xz forums-98ea7252d385dcf1aa4ee43efad34a52247542d6.zip |
Merge branch '3.2.x'
* 3.2.x:
[ticket/13264] Link to post if user can view it
[ticket/13264] Do not force approved state if post visibility is known
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/functions_posting.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 58753122cc..452c989c76 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1492,6 +1492,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data 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_ary['force_approved_state'])) @@ -2299,7 +2303,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data $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_ary['topic_id']; |