diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-08 14:41:49 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-08 14:41:49 +0200 |
commit | 44d593ad855bc4e34b5d83aff602911ee264f49f (patch) | |
tree | cd1febb99951fa2b75aea30eb4744d8b1a039f2f | |
parent | 5f2b0fba1e2c30d01717a628e6deb4f93052d38e (diff) | |
parent | 00610677152f073c4cded21a24f5ce92bbb39b8c (diff) | |
download | forums-44d593ad855bc4e34b5d83aff602911ee264f49f.tar forums-44d593ad855bc4e34b5d83aff602911ee264f49f.tar.gz forums-44d593ad855bc4e34b5d83aff602911ee264f49f.tar.bz2 forums-44d593ad855bc4e34b5d83aff602911ee264f49f.tar.xz forums-44d593ad855bc4e34b5d83aff602911ee264f49f.zip |
Merge pull request #2360 from Nicofuma/ticket/12025
[ticket/12025] Post Preview no longer shows warnings
* Nicofuma/ticket/12025:
[ticket/12025] Apply DeMorgan
[ticket/12025] Fixing the condition....
[ticket/12025] Don't show any error on preview if the message is empty
[ticket/12025] Post Preview no longer shows warnings
-rw-r--r-- | phpBB/posting.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index cfd6524e62..054f6edb50 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -894,10 +894,13 @@ 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) + if (sizeof($message_parser->warn_msg) && $refresh && !$preview) { $message_parser->warn_msg = array(); } |