From c2dace762ec295c7a2d67758006b1fff56f1f573 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 20 Apr 2014 15:13:13 +0200 Subject: [ticket/12273] Fix long $vars lines for existing events PHPBB3-12273 --- phpBB/posting.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index ed1268e84b..3d48a67e60 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -82,7 +82,9 @@ $current_time = time(); * language keys. * @since 3.1-A1 */ -$vars = array('post_id', 'topic_id', 'forum_id', 'draft_id', 'lastclick', 'submit', 'preview', 'save', 'load', 'delete', 'cancel', 'refresh', 'mode', 'error'); +$vars = array('post_id', 'topic_id', 'forum_id', 'draft_id', 'lastclick'); +$vars = array_merge($vars, array('submit', 'preview', 'save', 'load', 'delete')); +$vars = array_merge($vars, array('cancel', 'refresh', 'mode', 'error')); extract($phpbb_dispatcher->trigger_event('core.modify_posting_parameters', compact($vars))); // Was cancel pressed? If so then redirect to the appropriate page @@ -1561,7 +1563,8 @@ $template->assign_vars(array( * @since 3.1-A1 * @change 3.1.0-b3 Added vars post_data, moderators, mode, page_title, s_topic_icons, form_enctype, s_action, s_hidden_fields */ -$vars = array('post_data', 'moderators', 'mode', 'page_title', 's_topic_icons', 'form_enctype', 's_action', 's_hidden_fields'); +$vars = array('post_data', 'moderators', 'mode', 'page_title', 's_topic_icons'); +$vars = array_merge($vars, array('form_enctype', 's_action', 's_hidden_fields')); extract($phpbb_dispatcher->trigger_event('core.posting_modify_template_vars', compact($vars))); // Build custom bbcodes array -- cgit v1.2.1 From 87899b0e140400e23341ea1286d50e330132be90 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Apr 2014 11:46:44 +0200 Subject: [ticket/12273] Update existing events PHPBB3-12273 --- phpBB/posting.php | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 3d48a67e60..11f0898440 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -82,9 +82,22 @@ $current_time = time(); * language keys. * @since 3.1-A1 */ -$vars = array('post_id', 'topic_id', 'forum_id', 'draft_id', 'lastclick'); -$vars = array_merge($vars, array('submit', 'preview', 'save', 'load', 'delete')); -$vars = array_merge($vars, array('cancel', 'refresh', 'mode', 'error')); +$vars = array( + 'post_id', + 'topic_id', + 'forum_id', + 'draft_id', + 'lastclick', + 'submit', + 'preview', + 'save', + 'load', + 'delete', + 'cancel', + 'refresh', + 'mode', + 'error', +); extract($phpbb_dispatcher->trigger_event('core.modify_posting_parameters', compact($vars))); // Was cancel pressed? If so then redirect to the appropriate page @@ -1563,8 +1576,16 @@ $template->assign_vars(array( * @since 3.1-A1 * @change 3.1.0-b3 Added vars post_data, moderators, mode, page_title, s_topic_icons, form_enctype, s_action, s_hidden_fields */ -$vars = array('post_data', 'moderators', 'mode', 'page_title', 's_topic_icons'); -$vars = array_merge($vars, array('form_enctype', 's_action', 's_hidden_fields')); +$vars = array( + 'post_data', + 'moderators', + 'mode', + 'page_title', + 's_topic_icons', + 'form_enctype', + 's_action', + 's_hidden_fields', +); extract($phpbb_dispatcher->trigger_event('core.posting_modify_template_vars', compact($vars))); // Build custom bbcodes array -- cgit v1.2.1 From b32895308d13d5d9b0cd954fd8ce871a1fa073da Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Apr 2014 12:15:44 +0200 Subject: [ticket/12273] Update since version to 3.1.0-a* style PHPBB3-12273 --- phpBB/posting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 11f0898440..cfd6524e62 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -80,7 +80,7 @@ $current_time = time(); * form submission. * NOTE: Should be actual language strings, NOT * language keys. -* @since 3.1-A1 +* @since 3.1.0-a1 */ $vars = array( 'post_id', @@ -1573,7 +1573,7 @@ $template->assign_vars(array( * this is "multipart/form-data" else it is the empty string * @var string s_action The URL to submit the POST data to * @var string s_hidden_fields The concatenated input tags of the form's hidden fields -* @since 3.1-A1 +* @since 3.1.0-a1 * @change 3.1.0-b3 Added vars post_data, moderators, mode, page_title, s_topic_icons, form_enctype, s_action, s_hidden_fields */ $vars = array( -- cgit v1.2.1 From 0ef920eb427203e27cb56c19d2a6894ba79786c4 Mon Sep 17 00:00:00 2001 From: Nicofuma Date: Sat, 26 Apr 2014 15:01:30 +0200 Subject: [ticket/12025] Post Preview no longer shows warnings https://tracker.phpbb.com/browse/PHPBB3-12025 PHPBB3-12025 --- phpBB/posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index ed1268e84b..975f4bd079 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -882,7 +882,7 @@ if ($submit || $preview || $refresh) $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']); // On a refresh we do not care about message parsing errors - if (sizeof($message_parser->warn_msg) && $refresh) + if (sizeof($message_parser->warn_msg) && $refresh && !$preview) { $message_parser->warn_msg = array(); } -- cgit v1.2.1 From 8facf2b8d9980ef92ad519ebf004e1bdc1c4d287 Mon Sep 17 00:00:00 2001 From: Nicofuma Date: Sun, 27 Apr 2014 23:11:10 +0200 Subject: [ticket/12025] Don't show any error on preview if the message is empty PHPBB3-12025 --- phpBB/posting.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 975f4bd079..47b366fce0 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -879,7 +879,10 @@ if ($submit || $preview || $refresh) $message_parser->warn_msg = array(); } - $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']); + if ($preview && empty($message_parser->message)) + { + $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']); + } // On a refresh we do not care about message parsing errors if (sizeof($message_parser->warn_msg) && $refresh && !$preview) -- cgit v1.2.1 From 7af9f41e4f2a179065ce42dfb0755ecf3459add7 Mon Sep 17 00:00:00 2001 From: Nicofuma Date: Mon, 28 Apr 2014 21:18:01 +0200 Subject: [ticket/12025] Fixing the condition.... PHPBB3-12025 --- phpBB/posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 47b366fce0..9a3df73701 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -879,7 +879,7 @@ if ($submit || $preview || $refresh) $message_parser->warn_msg = array(); } - if ($preview && empty($message_parser->message)) + if (! ($preview && empty($message_parser->message))) { $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']); } -- cgit v1.2.1 From 00610677152f073c4cded21a24f5ce92bbb39b8c Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Mon, 5 May 2014 18:23:55 +0200 Subject: [ticket/12025] Apply DeMorgan PHPBB3-12025 --- phpBB/posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 9a3df73701..89056f0f11 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -879,7 +879,7 @@ if ($submit || $preview || $refresh) $message_parser->warn_msg = array(); } - if (! ($preview && empty($message_parser->message))) + if (!$preview || !empty($message_parser->message)) { $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']); } -- cgit v1.2.1