aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_pm_options.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-05-19 16:30:52 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-05-19 16:30:52 +0200
commite8602d4203132502cba0e5bf4bc17a8e0e4281ed (patch)
treeecda464f66979aea19fea269125532806c4003e4 /phpBB/includes/ucp/ucp_pm_options.php
parent3106195cddec48ec779282d03f2c54c88fc66511 (diff)
downloadforums-e8602d4203132502cba0e5bf4bc17a8e0e4281ed.tar
forums-e8602d4203132502cba0e5bf4bc17a8e0e4281ed.tar.gz
forums-e8602d4203132502cba0e5bf4bc17a8e0e4281ed.tar.bz2
forums-e8602d4203132502cba0e5bf4bc17a8e0e4281ed.tar.xz
forums-e8602d4203132502cba0e5bf4bc17a8e0e4281ed.zip
[ticket/13832] Use preg_replace_callback in ucp_pm_options
PHPBB3-13832
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm_options.php')
-rw-r--r--phpBB/includes/ucp/ucp_pm_options.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php
index 9c21971bf8..1faec590aa 100644
--- a/phpBB/includes/ucp/ucp_pm_options.php
+++ b/phpBB/includes/ucp/ucp_pm_options.php
@@ -507,7 +507,9 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
$rule_lang = $action_lang = $check_lang = array();
// Build all three language arrays
- preg_replace('#^((RULE|ACTION|CHECK)_([A-Z0-9_]+))$#e', "\${strtolower('\\2') . '_lang'}[constant('\\1')] = \$user->lang['PM_\\2']['\\3']", array_keys(get_defined_constants()));
+ preg_replace_callback('#^((RULE|ACTION|CHECK)_([A-Z0-9_]+))$#', function ($match) use(&$rule_lang, &$action_lang, &$check_lang, $user) {
+ ${strtolower($match[2]) . '_lang'}[constant($match[1])] = $user->lang['PM_' . $match[2]][$match[3]];
+ } , array_keys(get_defined_constants()));
/*
Rule Ordering: