diff options
author | rxu <rxu@mail.ru> | 2010-10-26 01:38:09 +0800 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2010-10-26 01:38:09 +0800 |
commit | 67b243cfc53e3f5f8bf6cd2a5eb80df475a6dd4c (patch) | |
tree | 83371c944c25bc3ccfdd28fabf71067db51191bc /phpBB/includes/ucp/ucp_profile.php | |
parent | ecd648c9967f360ea21d3f1a479704af803499fe (diff) | |
download | forums-67b243cfc53e3f5f8bf6cd2a5eb80df475a6dd4c.tar forums-67b243cfc53e3f5f8bf6cd2a5eb80df475a6dd4c.tar.gz forums-67b243cfc53e3f5f8bf6cd2a5eb80df475a6dd4c.tar.bz2 forums-67b243cfc53e3f5f8bf6cd2a5eb80df475a6dd4c.tar.xz forums-67b243cfc53e3f5f8bf6cd2a5eb80df475a6dd4c.zip |
[ticket/9867] Adjust the implementation of error messages localization.
Use array_map instead of preg_replace.
PHPBB3-9867
Diffstat (limited to 'phpBB/includes/ucp/ucp_profile.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index afd85c9975..304c83d68a 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -239,7 +239,7 @@ class ucp_profile } // Replace "error" strings with their real, localised form - $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); + $error = array_map(array($user, 'lang'), $error); } $template->assign_vars(array( @@ -386,7 +386,7 @@ class ucp_profile } // Replace "error" strings with their real, localised form - $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); + $error = array_map(array($user, 'lang'), $error); } if ($config['allow_birthdays']) @@ -511,7 +511,7 @@ class ucp_profile } // Replace "error" strings with their real, localised form - $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); + $error = array_map(array($user, 'lang'), $error); } $signature_preview = ''; @@ -582,7 +582,7 @@ class ucp_profile $error[] = 'FORM_INVALID'; } // Replace "error" strings with their real, localised form - $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); + $error = array_map(array($user, 'lang'), $error); } if (!$config['allow_avatar'] && $user->data['user_avatar_type']) |