phpBB

Code Changes

File: includes/acp/acp_groups.php

  Unmodified   Added   Modified   Removed
Line 323Line 323
				$avatar_drivers = null;
$avatar_data = null;
$avatar_error = array();

				$avatar_drivers = null;
$avatar_data = null;
$avatar_error = array();

 

/** @var \phpbb\avatar\manager $phpbb_avatar_manager */
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');


if ($config['allow_avatar'])
{


if ($config['allow_avatar'])
{

					$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');

 
					$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();

// This is normalised data, without the group_ prefix

					$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();

// This is normalised data, without the group_ prefix

Line 666Line 668
				{
$avatars_enabled = false;
$selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $avatar_data['avatar_type']));

				{
$avatars_enabled = false;
$selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $avatar_data['avatar_type']));

 

// Assign min and max values before generating avatar driver html
$template->assign_vars(array(
'AVATAR_MIN_WIDTH' => $config['avatar_min_width'],
'AVATAR_MAX_WIDTH' => $config['avatar_max_width'],
'AVATAR_MIN_HEIGHT' => $config['avatar_min_height'],
'AVATAR_MAX_HEIGHT' => $config['avatar_max_height'],
));


foreach ($avatar_drivers as $current_driver)
{
$driver = $phpbb_avatar_manager->get_driver($current_driver);

$avatars_enabled = true;


foreach ($avatar_drivers as $current_driver)
{
$driver = $phpbb_avatar_manager->get_driver($current_driver);

$avatars_enabled = true;

						$config_name = $phpbb_avatar_manager->get_driver_config_name($driver);

 
						$template->set_filenames(array(

						$template->set_filenames(array(

							'avatar' => "acp_avatar_options_{$config_name}.html",

							'avatar' => $driver->get_acp_template_name(),

						));

if ($driver->prepare_form($request, $template, $user, $avatar_data, $avatar_error))

						));

if ($driver->prepare_form($request, $template, $user, $avatar_data, $avatar_error))