mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/8319] Do not repeat the replacement
PHPBB3-8319
This commit is contained in:
parent
6206d4aa4e
commit
9210d735a5
1 changed files with 5 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue