diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-05-19 16:29:10 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-05-19 16:29:10 +0200 |
commit | a430fef05bcf034b790a2603879ada90fa5d1b71 (patch) | |
tree | a883cefaabf7857b5056ab3a35393b96187a52f4 /phpBB/includes/acp | |
parent | 579658461115de68aa05c34b0dfd6744a40d0f10 (diff) | |
download | forums-a430fef05bcf034b790a2603879ada90fa5d1b71.tar forums-a430fef05bcf034b790a2603879ada90fa5d1b71.tar.gz forums-a430fef05bcf034b790a2603879ada90fa5d1b71.tar.bz2 forums-a430fef05bcf034b790a2603879ada90fa5d1b71.tar.xz forums-a430fef05bcf034b790a2603879ada90fa5d1b71.zip |
[ticket/13832] Use preg_replace_callback in acp_bbcodes
PHPBB3-13832
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index 9c00e89713..0cfe791ad7 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -558,10 +558,18 @@ class acp_bbcodes trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); } - $fp_match = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $fp_match); - $fp_replace = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $fp_replace); - $sp_match = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $sp_match); - $sp_replace = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $sp_replace); + $fp_match = preg_replace_callback('#\[/?' . $bbcode_search . '#i', function ($match) { + return strtolower($match[0]); + }, $fp_match); + $fp_replace = preg_replace_callback('#\[/?' . $bbcode_search . '#i', function ($match) { + return strtolower($match[0]); + }, $fp_replace); + $sp_match = preg_replace_callback('#\[/?' . $bbcode_search . '#i', function ($match) { + return strtolower($match[0]); + }, $sp_match); + $sp_replace = preg_replace_callback('#\[/?' . $bbcode_search . '#i', function ($match) { + return strtolower($match[0]); + }, $sp_replace); return array( 'bbcode_tag' => $bbcode_tag, |