mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-25 01:25:57 +02:00
View profile now shows relevant add/remove links
git-svn-id: file:///svn/phpbb/trunk@6462 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -367,6 +367,19 @@ switch ($mode)
|
||||
{
|
||||
$group_options .= '<option value="' . $row['group_id'] . '"' . (($row['group_id'] == $member['group_id']) ? ' selected="selected"' : '') . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// What colour is the zebra
|
||||
$sql = 'SELECT friend, foe
|
||||
FROM ' . ZEBRA_TABLE . "
|
||||
WHERE zebra_id = $user_id
|
||||
AND user_id = {$user->data['user_id']}";
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$foe = ($row['foe']) ? true : false;
|
||||
$friend = ($row['friend']) ? true : false;
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($config['load_onlinetrack'])
|
||||
{
|
||||
@@ -484,9 +497,11 @@ switch ($mode)
|
||||
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_id) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_id}") : '',
|
||||
|
||||
'S_ZEBRA' => ($user->data['user_id'] != $user_id && $user->data['is_registered'] && $zebra_enabled) ? true : false,
|
||||
'U_ADD_FRIEND' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&add=' . urlencode($member['username'])),
|
||||
'U_ADD_FOE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&mode=foes&add=' . urlencode($member['username'])))
|
||||
);
|
||||
'U_ADD_FRIEND' => (!$friend) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&add=' . urlencode($member['username'])) : '',
|
||||
'U_ADD_FOE' => (!$foe) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&mode=foes&add=' . urlencode($member['username'])) : '',
|
||||
'U_REMOVE_FRIEND' => ($friend) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&usernames[]=' . $user_id) : '',
|
||||
'U_REMOVE_FOE' => ($foe) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&usernames[]=' . $user_id) : '',
|
||||
));
|
||||
|
||||
if (!empty($profile_fields['row']))
|
||||
{
|
||||
|
Reference in New Issue
Block a user