-
Task
-
Resolution: Fixed
-
Minor
-
3.1.0-dev
-
None
We use the trick to localize error messages similar to
// Replace "error" strings with their real, localised form
|
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
|
in the following files:
acp_users.php - for 5 times;
ucp_prefs.php - for 2 times;
ucp_profile.php - for 4 times;
ucp_register.php - for 1 time.
After the IRC discussion the better implementation seems to be using the scheme
// Replace "error" strings with their real, localised form
|
$error = array_map(array($user, 'lang'), $error);
|
- is related to
-
PHPBB-9666 Replace preg_replace with /e modifier with preg_replace_callback in includes/acp/acp_users.php
- Closed