phpBB

Code Changes

File: includes/acp/acp_groups.php

  Unmodified   Added   Modified   Removed
Line 28Line 28
		global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
global $request, $phpbb_container, $phpbb_dispatcher;

		global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
global $request, $phpbb_container, $phpbb_dispatcher;

 

/** @var \phpbb\language\language $language Language object */
$language = $phpbb_container->get('language');


$user->add_lang('acp/groups');
$this->tpl_name = 'acp_groups';


$user->add_lang('acp/groups');
$this->tpl_name = 'acp_groups';

Line 293Line 296
				// Add user/s to group
if ($error = group_user_add($group_id, false, $name_ary, $group_name, $default, $leader, 0, $group_row))
{

				// Add user/s to group
if ($error = group_user_add($group_id, false, $name_ary, $group_name, $default, $leader, 0, $group_row))
{

					trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING);













					$display_message = $language->lang($error);

if ($error == 'GROUP_USERS_INVALID')
{
// Find which users don't exist
$actual_name_ary = $name_ary;
$actual_user_id_ary = [];
user_get_id_name($actual_user_id_ary, $actual_name_ary, false, true);

$display_message = $language->lang('GROUP_USERS_INVALID', implode($language->lang('COMMA_SEPARATOR'), array_udiff($name_ary, $actual_name_ary, 'strcasecmp')));
}

trigger_error($display_message . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING);

				}

$message = ($leader) ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';

				}

$message = ($leader) ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';

Line 926Line 941
		);

// Get us all the groups

		);

// Get us all the groups

		$sql = 'SELECT g.group_id, g.group_name, g.group_type

		$sql = 'SELECT g.group_id, g.group_name, g.group_type, g.group_colour

			FROM ' . GROUPS_TABLE . ' g
ORDER BY g.group_type ASC, g.group_name';
$result = $db->sql_query($sql);

			FROM ' . GROUPS_TABLE . ' g
ORDER BY g.group_type ASC, g.group_name';
$result = $db->sql_query($sql);

Line 985Line 1000
					'S_GROUP_SPECIAL'	=> ($row['group_type'] == GROUP_SPECIAL) ? true : false,

'GROUP_NAME' => $group_name,

					'S_GROUP_SPECIAL'	=> ($row['group_type'] == GROUP_SPECIAL) ? true : false,

'GROUP_NAME' => $group_name,

 
					'GROUP_COLOR'	=> $row['group_colour'],

					'TOTAL_MEMBERS'	=> $row['total_members'],
'PENDING_MEMBERS' => $row['pending_members']
));

					'TOTAL_MEMBERS'	=> $row['total_members'],
'PENDING_MEMBERS' => $row['pending_members']
));