aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-07-22 10:42:46 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-07-22 10:42:46 +0200
commiteffafa4b4d82e8f0debcda2e84e03117433e5a7d (patch)
treed1af0d28afb775a0895fbd5747f39b91c7336787 /phpBB/includes/functions_posting.php
parent603dc1f78617e64e41f61daf85f463b0465123ec (diff)
downloadforums-effafa4b4d82e8f0debcda2e84e03117433e5a7d.tar
forums-effafa4b4d82e8f0debcda2e84e03117433e5a7d.tar.gz
forums-effafa4b4d82e8f0debcda2e84e03117433e5a7d.tar.bz2
forums-effafa4b4d82e8f0debcda2e84e03117433e5a7d.tar.xz
forums-effafa4b4d82e8f0debcda2e84e03117433e5a7d.zip
[ticket/11717] Add 'has' to boolean variable and reduce line length
PHPBB3-11717
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index f80736a6c4..103cc81205 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1995,9 +1995,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
}
- $first_post_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)));
+ $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)
{
@@ -2010,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' || $first_post_topic_info)
+ 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)
{