phpBB

Code Changes

File: includes/acp/acp_groups.php

  Unmodified   Added   Modified   Removed
Line 42Line 42
			return;
}


			return;
}


 
		if (!function_exists('group_user_attributes'))
{

		include($phpbb_root_path . 'includes/functions_user.' . $phpEx);

		include($phpbb_root_path . 'includes/functions_user.' . $phpEx);

 
		}


// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addusers'])) ? 'addusers' : request_var('action', ''));


// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addusers'])) ? 'addusers' : request_var('action', ''));

Line 295Line 298
			case 'edit':
case 'add':


			case 'edit':
case 'add':


 
				if (!function_exists('display_forums'))
{

				include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

				include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

 
				}


$data = $submit_ary = array();



$data = $submit_ary = array();


Line 317Line 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 660Line 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))