From df16bd1c49e6e970b147f15e752825dd3186fb87 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 27 Jun 2012 21:02:07 +0200 Subject: [feature/avatars] Rewrite drivers to use full class name * Use full driver class name as avatar_type value * Move avatar drivers to core namespace * Make avatars installable through extensions PHPBB3-10018 --- phpBB/includes/ucp/ucp_profile.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 6b2133796d..f406e9dc5b 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -623,18 +623,18 @@ class ucp_profile } $focused_driver = request_var('avatar_driver', $user->data['user_avatar_type']); - + foreach ($avatar_drivers as $driver) { - if ($config["allow_avatar_$driver"]) + $avatar = $phpbb_avatar_manager->get_driver($driver); + + if ($avatar->is_enabled()) { $avatars_enabled = true; $template->set_filenames(array( - 'avatar' => "ucp_avatar_options_$driver.html", + 'avatar' => $avatar->get_template_name(), )); - $avatar = $phpbb_avatar_manager->get_driver($driver); - if ($avatar->prepare_form($template, $avatar_data, $error)) { $driver_u = strtoupper($driver); -- cgit v1.2.1