diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2013-01-06 21:09:07 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2013-01-06 21:09:07 +0100 |
| commit | 41710c745d5507aa71e25b125b0ae1485cc7ecc1 (patch) | |
| tree | 22b58ad607316acdca8fa8aab89fc94cdbc2b488 /phpBB/includes/ucp | |
| parent | 111e02395c2879662e2a3d07558519b838ddb69a (diff) | |
| download | forums-41710c745d5507aa71e25b125b0ae1485cc7ecc1.tar forums-41710c745d5507aa71e25b125b0ae1485cc7ecc1.tar.gz forums-41710c745d5507aa71e25b125b0ae1485cc7ecc1.tar.bz2 forums-41710c745d5507aa71e25b125b0ae1485cc7ecc1.tar.xz forums-41710c745d5507aa71e25b125b0ae1485cc7ecc1.zip | |
[feature/avatars] Add function for localizing errors
PHPBB3-10018
Diffstat (limited to 'phpBB/includes/ucp')
| -rw-r--r-- | phpBB/includes/ucp/ucp_groups.php | 14 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 15 |
2 files changed, 3 insertions, 26 deletions
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index b3e07cc7b9..86c02b5bcc 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -674,19 +674,7 @@ class ucp_groups } // Merge any avatars errors into the primary error array - // Drivers use lang constants, so we need to map to the actual strings - foreach ($avatar_error as $lang) - { - if (is_array($lang)) - { - $key = array_shift($lang); - $error[] = vsprintf($user->lang($key), $lang); - } - else - { - $error[] = $user->lang("$lang"); - } - } + $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error)); $template->assign_vars(array( 'S_EDIT' => true, diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 598314a035..36d59e7854 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -659,19 +659,8 @@ class ucp_profile } // Replace "error" strings with their real, localised form - foreach ($error as $key => $lang) - { - if (is_array($lang)) - { - $key = array_shift($lang); - $error[$key] = vsprintf($user->lang($key), $lang); - } - else - { - $error[$key] = $user->lang("$lang"); - } - } - + $error = $phpbb_avatar_manager->localize_errors($user, $error); + $avatar = phpbb_get_user_avatar($user->data, 'USER_AVATAR', true); $template->assign_vars(array( |
