mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/13832] Use preg_replace_callback in ucp_pm_options
PHPBB3-13832
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user