diff options
author | Marc Alexander <admin@m-a-styles.de> | 2012-11-25 16:04:59 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2012-11-25 16:05:57 +0100 |
commit | 06639729ea2da6d0025da74ae7d4f3e88f211b67 (patch) | |
tree | 95e41d8ce8f741eeaff004739771ec47698357ab /phpBB/includes/ucp | |
parent | 6d061304afaa703a5305a06a903356d1c48ff2ee (diff) | |
download | forums-06639729ea2da6d0025da74ae7d4f3e88f211b67.tar forums-06639729ea2da6d0025da74ae7d4f3e88f211b67.tar.gz forums-06639729ea2da6d0025da74ae7d4f3e88f211b67.tar.bz2 forums-06639729ea2da6d0025da74ae7d4f3e88f211b67.tar.xz forums-06639729ea2da6d0025da74ae7d4f3e88f211b67.zip |
[feature/avatars] Add static methods for handling driver names
PHPBB3-10018
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r-- | phpBB/includes/ucp/ucp_groups.php | 6 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index 33f147a47e..df6915711c 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -521,7 +521,7 @@ class ucp_groups if ($config['allow_avatar']) { // Handle avatar - $driver = str_replace('_', '.', request_var('avatar_driver', '')); + $driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', '')); $config_name = preg_replace('#^avatar\.driver.#', '', $driver); $avatar_delete = $request->variable('avatar_delete', ''); if (in_array($driver, $avatar_drivers) && $config["allow_avatar_$config_name"] && empty($avatar_delete)) @@ -652,7 +652,7 @@ class ucp_groups if ($config['allow_avatar']) { $avatars_enabled = false; - $focused_driver = str_replace('_', '.', request_var('avatar_driver', $avatar_data['avatar_type'])); + $focused_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $avatar_data['avatar_type'])); foreach ($avatar_drivers as $driver) { @@ -667,7 +667,7 @@ class ucp_groups if ($avatar->prepare_form($template, $avatar_data, $avatar_error)) { - $driver_name = str_replace('.', '_', $driver); + $driver_name = $phpbb_avatar_manager->prepare_driver_name($driver); $driver_upper = strtoupper($driver_name); $template->assign_block_vars('avatar_drivers', array( 'L_TITLE' => $user->lang($driver_upper . '_TITLE'), diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 3945fc537a..36ac227bc8 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -564,7 +564,7 @@ class ucp_profile { if (check_form_key('ucp_avatar')) { - $driver = str_replace('_', '.', request_var('avatar_driver', '')); + $driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', '')); $config_name = preg_replace('#^avatar\.driver.#', '', $driver); $avatar_delete = $request->variable('avatar_delete', ''); if (in_array($driver, $avatar_drivers) && $config["allow_avatar_$config_name"] && empty($avatar_delete)) @@ -624,7 +624,7 @@ class ucp_profile } } - $focused_driver = str_replace('_', '.', request_var('avatar_driver', $user->data['user_avatar_type'])); + $focused_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $user->data['user_avatar_type'])); foreach ($avatar_drivers as $driver) { @@ -639,7 +639,7 @@ class ucp_profile if ($avatar->prepare_form($template, $avatar_data, $error)) { - $driver_name = str_replace('.', '_', $driver); + $driver_name = $phpbb_avatar_manager->prepare_driver_name($driver); $driver_upper = strtoupper($driver_name); $template->assign_block_vars('avatar_drivers', array( |