aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_prefs.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_prefs.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_prefs.php')
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index cc8565e69d..ab8320d458 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -105,7 +105,7 @@ class ucp_prefs
}
// 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);
}
$dateformat_options = '';
@@ -227,7 +227,7 @@ class ucp_prefs
}
// 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);
}
$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);