Skip to content

Commit

Permalink
Merge pull request phpbb#2360 from Nicofuma/ticket/12025
Browse files Browse the repository at this point in the history
[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
  • Loading branch information
nickvergessen committed May 8, 2014
2 parents 5f2b0fb + 0061067 commit 44d593a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions phpBB/posting.php
Original file line number Diff line number Diff line change
Expand Up @@ -894,10 +894,13 @@
$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();
}
Expand Down

0 comments on commit 44d593a

Please sign in to comment.