mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-22 08:13:14 +02:00
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/softdelete-1-permission
* 'develop' of https://github.com/phpbb/phpbb3: (234 commits) [ticket/11398] Correctly call permission_set method in permission tool [ticket/11394] Relax Migration Tools [ticket/11386] Fix missing ; [ticket/10714] Get log from container in install, update and download/file [feature/avatars] Update module_auth of ucp module and fix small issues [ticket/11396] Rename insert_migration to set_migration_state [ticket/11395] Prevent acp_modules::get_modules_info from reincluding files [ticket/11393] Give more information on database updater [ticket/11386] Send list of migrations instead of using load_migrations [feature/avatars] Add migrations data file for avatars [feature/avatars] Reduce module auth of ucp avatar settings [ticket/10714] Use $phpbb_adm_relative_path instead of hardcoded adm/ [ticket/10714] Logs are disabled for this page call only [ticket/10411] Fix call to function on non-object $db->...() [ticket/10411] Remove ajax delete, so the page is refreshed [feature/avatars] Auto-clear avatar dimensions when first changing avatars [ticket/10411] Update schema file with new table and remove the column [ticket/10411] Add unit tests for move() with values >1 [ticket/10411] Add migrations file for teampage table [ticket/10411] Revert database_update.php changes from for easier update ...
This commit is contained in:
@@ -71,21 +71,28 @@ switch ($mode)
|
||||
$page_title = $user->lang['THE_TEAM'];
|
||||
$template_html = 'memberlist_leaders.html';
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . TEAMPAGE_TABLE . '
|
||||
ORDER BY teampage_position ASC';
|
||||
$result = $db->sql_query($sql, 3600);
|
||||
$teampage_data = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'g.group_id, g.group_name, g.group_colour, g.group_type, g.group_teampage, ug.user_id as ug_user_id',
|
||||
'SELECT' => 'g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id as ug_user_id, t.teampage_id',
|
||||
|
||||
'FROM' => array(GROUPS_TABLE => 'g'),
|
||||
|
||||
'LEFT_JOIN' => array(
|
||||
array(
|
||||
'FROM' => array(TEAMPAGE_TABLE => 't'),
|
||||
'ON' => 't.group_id = g.group_id',
|
||||
),
|
||||
array(
|
||||
'FROM' => array(USER_GROUP_TABLE => 'ug'),
|
||||
'ON' => 'ug.group_id = g.group_id AND ug.user_pending = 0 AND ug.user_id = ' . (int) $user->data['user_id'],
|
||||
),
|
||||
),
|
||||
|
||||
'WHERE' => '',
|
||||
|
||||
'ORDER_BY' => 'g.group_teampage ASC',
|
||||
);
|
||||
|
||||
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||
@@ -104,7 +111,7 @@ switch ($mode)
|
||||
$row['u_group'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']);
|
||||
}
|
||||
|
||||
if ($row['group_teampage'])
|
||||
if ($row['teampage_id'])
|
||||
{
|
||||
// Only put groups into the array we want to display.
|
||||
// We are fetching all groups, to ensure we got all data for default groups.
|
||||
@@ -204,10 +211,26 @@ switch ($mode)
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($groups_ary as $group_id => $group_data)
|
||||
$parent_team = 0;
|
||||
foreach ($teampage_data as $team_data)
|
||||
{
|
||||
if ($group_data['group_teampage'])
|
||||
// If this team entry has no group, it's a category
|
||||
if (!$team_data['group_id'])
|
||||
{
|
||||
$template->assign_block_vars('group', array(
|
||||
'GROUP_NAME' => $team_data['teampage_name'],
|
||||
));
|
||||
|
||||
$parent_team = (int) $team_data['teampage_id'];
|
||||
continue;
|
||||
}
|
||||
|
||||
$group_data = $groups_ary[(int) $team_data['group_id']];
|
||||
$group_id = (int) $team_data['group_id'];
|
||||
|
||||
if (!$team_data['teampage_parent'])
|
||||
{
|
||||
// If the group does not have a parent category, we display the groupname as category
|
||||
$template->assign_block_vars('group', array(
|
||||
'GROUP_NAME' => $group_data['group_name'],
|
||||
'GROUP_COLOR' => $group_data['group_colour'],
|
||||
@@ -223,7 +246,7 @@ switch ($mode)
|
||||
if (isset($user_ary[$user_id]))
|
||||
{
|
||||
$row = $user_ary[$user_id];
|
||||
if ($config['teampage_memberships'] == 1 && ($group_id != $groups_ary[$row['default_group']]['group_id']) && $groups_ary[$row['default_group']]['group_teampage'])
|
||||
if ($config['teampage_memberships'] == 1 && ($group_id != $groups_ary[$row['default_group']]['group_id']) && $groups_ary[$row['default_group']]['teampage_id'])
|
||||
{
|
||||
// Display users in their primary group, instead of the first group, when it is displayed on the teampage.
|
||||
continue;
|
||||
@@ -549,7 +572,7 @@ switch ($mode)
|
||||
$member['user_sig'] = smiley_text($member['user_sig']);
|
||||
}
|
||||
|
||||
$poster_avatar = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']);
|
||||
$poster_avatar = phpbb_get_user_avatar($member);
|
||||
|
||||
// We need to check if the modules 'zebra' ('friends' & 'foes' mode), 'notes' ('user_notes' mode) and 'warn' ('warn_user' mode) are accessible to decide if we can display appropriate links
|
||||
$zebra_enabled = $friends_enabled = $foes_enabled = $user_notes_enabled = $warn_user_enabled = false;
|
||||
@@ -1234,8 +1257,7 @@ switch ($mode)
|
||||
break;
|
||||
}
|
||||
|
||||
// Misusing the avatar function for displaying group avatars...
|
||||
$avatar_img = get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR');
|
||||
$avatar_img = phpbb_get_group_avatar($group_row);
|
||||
|
||||
// ... same for group rank
|
||||
$rank_title = $rank_img = $rank_img_src = '';
|
||||
@@ -1728,7 +1750,7 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
|
||||
|
||||
'A_USERNAME' => addslashes(get_username_string('username', $user_id, $username, $data['user_colour'])),
|
||||
|
||||
'AVATAR_IMG' => get_user_avatar($data['user_avatar'], $data['user_avatar_type'], $data['user_avatar_width'], $data['user_avatar_height']),
|
||||
'AVATAR_IMG' => phpbb_get_user_avatar($data),
|
||||
'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
|
||||
'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
|
||||
'RANK_IMG' => $rank_img,
|
||||
|
Reference in New Issue
Block a user