aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_profile.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2010-10-26 01:38:09 +0800
committerrxu <rxu@mail.ru>2010-10-26 01:38:09 +0800
commit67b243cfc53e3f5f8bf6cd2a5eb80df475a6dd4c (patch)
tree83371c944c25bc3ccfdd28fabf71067db51191bc /phpBB/includes/ucp/ucp_profile.php
parentecd648c9967f360ea21d3f1a479704af803499fe (diff)
downloadforums-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.php8
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'])