phpBB

Code Changes

File: includes/ucp/ucp_groups.php

  Unmodified   Added   Modified   Removed
Line 136Line 136
							{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

							{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

							list(, $row) = each($row);

							$row = current($row);


$sql = 'SELECT group_type
FROM ' . GROUPS_TABLE . '


$sql = 'SELECT group_type
FROM ' . GROUPS_TABLE . '

Line 240Line 240
							{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

							{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

							list(, $row) = each($row);

							$row = current($row);


if (!$row['group_leader'])
{


if (!$row['group_leader'])
{

Line 440Line 440
						'GROUP_DESC_DISP'		=> generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']),
'GROUP_TYPE' => $group_row['group_type'],


						'GROUP_DESC_DISP'		=> generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']),
'GROUP_TYPE' => $group_row['group_type'],


						'AVATAR'				=> (empty($avatar) ? '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />' : $avatar),
'AVATAR_IMAGE' => (empty($avatar) ? '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />' : $avatar),
'AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '',
'AVATAR_HEIGHT' => (isset($group_row['group_avatar_height'])) ? $group_row['group_avatar_height'] : '',

						'AVATAR'				=> !empty($avatar) ? $avatar : '',
'AVATAR_IMAGE' => !empty($avatar) ? $avatar : '',
'AVATAR_WIDTH' => isset($group_row['group_avatar_width']) ? $group_row['group_avatar_width'] : '',
'AVATAR_HEIGHT' => isset($group_row['group_avatar_height']) ? $group_row['group_avatar_height'] : '',

					));
}


					));
}


Line 460Line 460
						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						list(, $row) = each($row);

						$row = current($row);


if (!$row['group_leader'])
{


if (!$row['group_leader'])
{

Line 495Line 495
						{
if (confirm_box(true))
{

						{
if (confirm_box(true))
{

 
								$avatar_data['id'] = substr($avatar_data['id'], 1);

								$phpbb_avatar_manager->handle_avatar_delete($db, $user, $avatar_data, GROUPS_TABLE, 'group_');
$cache->destroy('sql', GROUPS_TABLE);


								$phpbb_avatar_manager->handle_avatar_delete($db, $user, $avatar_data, GROUPS_TABLE, 'group_');
$cache->destroy('sql', GROUPS_TABLE);


								$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';

								$message = $action === 'edit' ? 'GROUP_UPDATED' : 'GROUP_CREATED';

								trigger_error($user->lang[$message] . $return_page);
}
else

								trigger_error($user->lang[$message] . $return_page);
}
else

Line 508Line 509
										'i'                 => $id,
'mode' => $mode,
'g' => $group_id,

										'i'                 => $id,
'mode' => $mode,
'g' => $group_id,

										'action'            => $action))
);

									'action'            => $action,
)));

							}
}


							}
}


Line 534Line 535
								'teampage'	=> $group_row['group_teampage'],
);


								'teampage'	=> $group_row['group_teampage'],
);


							if ($config['allow_avatar'])






							if (!check_form_key('ucp_groups'))
{
$error[] = $user->lang['FORM_INVALID'];
}

if (!count($error) && $config['allow_avatar'])

							{
// Handle avatar
$driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', ''));

							{
// Handle avatar
$driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', ''));

Line 554Line 560

// Merge any avatars errors into the primary error array
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));


// Merge any avatars errors into the primary error array
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));

							}

if (!check_form_key('ucp_groups'))
{
$error[] = $user->lang['FORM_INVALID'];

 
							}

// Validate submitted colour value

							}

// Validate submitted colour value

Line 754Line 755
						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						list(, $row) = each($row);

						$row = current($row);


if (!$row['group_leader'])
{


if (!$row['group_leader'])
{

Line 873Line 874
						if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . $return_page);

						if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . $return_page);

 
						}

if (!check_form_key('ucp_groups'))
{
trigger_error($user->lang('FORM_INVALID') . $return_page);

						}

if (!($row = group_memberships($group_id, $user->data['user_id'])))
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						}

if (!($row = group_memberships($group_id, $user->data['user_id'])))
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						list(, $row) = each($row);

						$row = current($row);


if (!$row['group_leader'])
{


if (!$row['group_leader'])
{

Line 906Line 912
						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						list(, $row) = each($row);

						$row = current($row);


if (!$row['group_leader'])
{


if (!$row['group_leader'])
{

Line 985Line 991
						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						list(, $row) = each($row);

						$row = current($row);


if (!$row['group_leader'])
{


if (!$row['group_leader'])
{

Line 1046Line 1052
						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}

						list(, $row) = each($row);

						$row = current($row);


if (!$row['group_leader'])
{


if (!$row['group_leader'])
{