From 0e49dc44092b31223b927487b2ef98aea25dc667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Bartus?= Date: Wed, 9 Mar 2016 20:25:27 +0100 Subject: [PATCH] [ticket/13264] Don't force approved state if post visibility is known (3.2) The previous PR broke 3.2 because of different variable names PHPBB3-13264 --- phpBB/includes/functions_posting.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 452c989c76..2bc7ed471e 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1492,9 +1492,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data break; } } - else if (isset($data['post_visibility']) && $data['post_visibility'] !== false) + else if (isset($data_ary['post_visibility']) && $data_ary['post_visibility'] !== false) { - $post_visibility = $data['post_visibility']; + $post_visibility = $data_ary['post_visibility']; } // MODs/Extensions are able to force any visibility on posts @@ -2304,8 +2304,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data $params = $add_anchor = ''; 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)))) + ($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) || + ($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE)))) { $params .= '&t=' . $data_ary['topic_id'];