mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/13832] Use preg_replace_callback in ucp_pm_options
PHPBB3-13832
This commit is contained in:
parent
3106195cdd
commit
e8602d4203
1 changed files with 3 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue