[ticket/8319] Do not repeat the replacement

PHPBB3-8319
This commit is contained in:
Joas Schilling 2013-07-06 19:40:25 +02:00
parent 6206d4aa4e
commit 9210d735a5

View file

@ -431,15 +431,11 @@ class acp_bbcodes
$fp_replace = str_replace($token, $replace, $fp_replace);
$sp_match = str_replace(preg_quote($token, '!'), $sp_tokens[$token_type], $sp_match);
if ($token_type === 'LOCAL_URL')
{
// Prepend the board url to local relative links
$sp_replace = str_replace($token, generate_board_url() . '/' . '${' . ($n + 1) . '}', $sp_replace);
}
else
{
$sp_replace = str_replace($token, '${' . ($n + 1) . '}', $sp_replace);
}
// Prepend the board url to local relative links
$replace_prepend = ($token_type === 'LOCAL_URL') ? generate_board_url() . '/' : '';
$sp_replace = str_replace($token, $replace_prepend . '${' . ($n + 1) . '}', $sp_replace);
}
$fp_match = '!' . $fp_match . '!' . $modifiers;