Skip to content

Commit

Permalink
Fixes mybb#1260 - Parser don't work if we have post...
Browse files Browse the repository at this point in the history
Fixes mybb#1260
  • Loading branch information
ATofighi committed Aug 19, 2014
1 parent 65e83a8 commit 0b30c1a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions inc/functions_post.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ function build_postbit($post, $post_type=0)
}
else
{
$parser_options = array(
$field_parser_options = array(
"allow_html" => $field['allowhtml'],
"allow_mycode" => $field['allowmycode'],
"allow_smilies" => $field['allowsmilies'],
Expand All @@ -441,19 +441,19 @@ function build_postbit($post, $post_type=0)

if($customfield['type'] == "textarea")
{
$parser_options['me_username'] = $post['username'];
$field_parser_options['me_username'] = $post['username'];
}
else
{
$parser_options['nl2br'] = 0;
$field_parser_options['nl2br'] = 0;
}

if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{
$parser_options['allow_imgcode'] = 0;
$field_parser_options['allow_imgcode'] = 0;
}

$post['fieldvalue'] = $parser->parse_message($post[$fieldfid], $parser_options);
$post['fieldvalue'] = $parser->parse_message($post[$fieldfid], $field_parser_options);
}

eval("\$post['profilefield'] .= \"".$templates->get("postbit_profilefield")."\";");
Expand Down

0 comments on commit 0b30c1a

Please sign in to comment.