phpBB

Code Changes

File: includes/ucp/ucp_zebra.php

  Unmodified   Added   Modified   Removed
Line 47Line 47
				$data[$var] = $request->variable($var, $default, true);
}


				$data[$var] = $request->variable($var, $default, true);
}


			if (!empty($data['add']) || sizeof($data['usernames']))

			if (!empty($data['add']) || count($data['usernames']))

			{
if (confirm_box(true))
{

			{
if (confirm_box(true))
{

Line 105Line 105
						$db->sql_freeresult($result);

// remove friends from the username array

						$db->sql_freeresult($result);

// remove friends from the username array

						$n = sizeof($data['add']);

						$n = count($data['add']);

						$data['add'] = array_diff($data['add'], $friends);


						$data['add'] = array_diff($data['add'], $friends);


						if (sizeof($data['add']) < $n && $mode == 'foes')

						if (count($data['add']) < $n && $mode == 'foes')

						{
$error[] = $user->lang['NOT_ADDED_FOES_FRIENDS'];
}

// remove foes from the username array

						{
$error[] = $user->lang['NOT_ADDED_FOES_FRIENDS'];
}

// remove foes from the username array

						$n = sizeof($data['add']);

						$n = count($data['add']);

						$data['add'] = array_diff($data['add'], $foes);


						$data['add'] = array_diff($data['add'], $foes);


						if (sizeof($data['add']) < $n && $mode == 'friends')

						if (count($data['add']) < $n && $mode == 'friends')

						{
$error[] = $user->lang['NOT_ADDED_FRIENDS_FOES'];
}

// remove the user himself from the username array

						{
$error[] = $user->lang['NOT_ADDED_FRIENDS_FOES'];
}

// remove the user himself from the username array

						$n = sizeof($data['add']);

						$n = count($data['add']);

						$data['add'] = array_diff($data['add'], array(utf8_clean_string($user->data['username'])));


						$data['add'] = array_diff($data['add'], array(utf8_clean_string($user->data['username'])));


						if (sizeof($data['add']) < $n)

						if (count($data['add']) < $n)

						{
$error[] = $user->lang['NOT_ADDED_' . $l_mode . '_SELF'];
}

unset($friends, $foes, $n);


						{
$error[] = $user->lang['NOT_ADDED_' . $l_mode . '_SELF'];
}

unset($friends, $foes, $n);


						if (sizeof($data['add']))

						if (count($data['add']))

						{
$sql = 'SELECT user_id, user_type
FROM ' . USERS_TABLE . '

						{
$sql = 'SELECT user_id, user_type
FROM ' . USERS_TABLE . '

Line 159Line 159
							}
$db->sql_freeresult($result);


							}
$db->sql_freeresult($result);


							if (sizeof($user_id_ary))

							if (count($user_id_ary))

							{
// Remove users from foe list if they are admins or moderators
if ($mode == 'foes')

							{
// Remove users from foe list if they are admins or moderators
if ($mode == 'foes')

Line 175Line 175

$perms = array_unique($perms);



$perms = array_unique($perms);


									if (sizeof($perms))

									if (count($perms))

									{
$error[] = $user->lang['NOT_ADDED_FOES_MOD_ADMIN'];
}

									{
$error[] = $user->lang['NOT_ADDED_FOES_MOD_ADMIN'];
}

Line 185Line 185
									unset($perms);
}


									unset($perms);
}


								if (sizeof($user_id_ary))

								if (count($user_id_ary))

								{
$sql_mode = ($mode == 'friends') ? 'friend' : 'foe';


								{
$sql_mode = ($mode == 'friends') ? 'friend' : 'foe';


Line 218Line 218
								}
unset($user_id_ary);
}

								}
unset($user_id_ary);
}

							else if (!sizeof($error))

							else if (!count($error))

							{
$error[] = $user->lang['USER_NOT_FOUND_OR_INACTIVE'];
}

							{
$error[] = $user->lang['USER_NOT_FOUND_OR_INACTIVE'];
}

Line 244Line 244
					else if ($updated)
{
meta_refresh(3, $this->u_action);

					else if ($updated)
{
meta_refresh(3, $this->u_action);

						$message = $user->lang[$l_mode . '_UPDATED'] . '<br />' . implode('<br />', $error) . ((sizeof($error)) ? '<br />' : '') . '<br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');

						$message = $user->lang[$l_mode . '_UPDATED'] . '<br />' . implode('<br />', $error) . ((count($error)) ? '<br />' : '') . '<br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');

						trigger_error($message);
}
else

						trigger_error($message);
}
else