diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-07-22 12:20:17 -0700 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-07-22 12:20:17 -0700 |
commit | 127ee62eddf07d705c9b243169db338ee4cbfaef (patch) | |
tree | 2930da727f871dc9f65e3716975661ff8935a759 /phpBB/includes/functions_posting.php | |
parent | b71038486e067daf0c608d73aabeb60a56e86840 (diff) | |
parent | effafa4b4d82e8f0debcda2e84e03117433e5a7d (diff) | |
download | forums-127ee62eddf07d705c9b243169db338ee4cbfaef.tar forums-127ee62eddf07d705c9b243169db338ee4cbfaef.tar.gz forums-127ee62eddf07d705c9b243169db338ee4cbfaef.tar.bz2 forums-127ee62eddf07d705c9b243169db338ee4cbfaef.tar.xz forums-127ee62eddf07d705c9b243169db338ee4cbfaef.zip |
Merge pull request #1589 from marc1706/ticket/11717
[ticket/11717] Use topic_posts_approved instead of topic_replies
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 03565c27bb..103cc81205 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1995,6 +1995,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } } + $first_post_has_topic_info = ($post_mode == 'edit_first_post' && + (($post_visibility == ITEM_DELETED && $data['topic_posts_softdeleted'] == 1) || + ($post_visibility == ITEM_UNAPPROVED && $data['topic_posts_unapproved'] == 1) || + ($post_visibility == ITEM_APPROVED && $data['topic_posts_approved'] == 1))); // Fix the post's and topic's visibility and first/last post information, when the post is edited if (($post_mode != 'post' && $post_mode != 'reply') && $data['post_visibility'] != $post_visibility) { @@ -2007,7 +2011,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $phpbb_content_visibility = $phpbb_container->get('content.visibility'); $phpbb_content_visibility->set_post_visibility($post_visibility, $data['post_id'], $data['topic_id'], $data['forum_id'], $user->data['user_id'], time(), '', $is_starter, $is_latest); } - else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies'])) + else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || $first_post_has_topic_info) { if ($post_visibility == ITEM_APPROVED || $data['topic_visibility'] == $post_visibility) { |