diff options
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 651f674ef9..bd36dc5db7 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1330,7 +1330,6 @@ if ($submit || $preview || $refresh) 'enable_urls' => (bool) $post_data['enable_urls'], 'enable_indexing' => (bool) $post_data['enable_indexing'], 'message_md5' => (string) $message_md5, - 'post_time' => (isset($post_data['post_time'])) ? (int) $post_data['post_time'] : $current_time, 'post_checksum' => (isset($post_data['post_checksum'])) ? (string) $post_data['post_checksum'] : '', 'post_edit_reason' => $post_data['post_edit_reason'], 'post_edit_user' => ($mode == 'edit') ? $user->data['user_id'] : ((isset($post_data['post_edit_user'])) ? (int) $post_data['post_edit_user'] : 0), @@ -1579,11 +1578,21 @@ if (!sizeof($error) && $preview) } } +// Remove quotes that would become nested too deep before decoding the text +$generate_quote = ($mode == 'quote' && !$submit && !$preview && !$refresh); +if ($generate_quote && $config['max_quote_depth'] > 0) +{ + $tmp_bbcode_uid = $message_parser->bbcode_uid; + $message_parser->bbcode_uid = $post_data['bbcode_uid']; + $message_parser->remove_nested_quotes($config['max_quote_depth'] - 1); + $message_parser->bbcode_uid = $tmp_bbcode_uid; +} + // Decode text for message display $post_data['bbcode_uid'] = ($mode == 'quote' && !$preview && !$refresh && !sizeof($error)) ? $post_data['bbcode_uid'] : $message_parser->bbcode_uid; $message_parser->decode_message($post_data['bbcode_uid']); -if ($mode == 'quote' && !$submit && !$preview && !$refresh) +if ($generate_quote) { if ($config['allow_bbcode']) { @@ -1841,6 +1850,7 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_ * @var int post_id ID of the post * @var int topic_id ID of the topic * @var int forum_id ID of the forum +* @var int draft_id ID of the draft * @var bool submit Whether or not the form has been submitted * @var bool preview Whether or not the post is being previewed * @var bool save Whether or not a draft is being saved @@ -1863,6 +1873,7 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_ * delete, cancel, refresh, error, page_data, message_parser * @change 3.1.2-RC1 Removed 'delete' var as it does not exist * @change 3.1.5-RC1 Added poll variables to the page_data array +* @change 3.1.6-RC1 Added 'draft_id' var */ $vars = array( 'post_data', @@ -1876,6 +1887,7 @@ $vars = array( 'post_id', 'topic_id', 'forum_id', + 'draft_id', 'submit', 'preview', 'save', |