1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 05:34:01 +02:00

[ticket/14253] Show group requests pending aproval at the ACP groups summary

Currenty, you need to open each existing group in ACP to know if there
are pending group requests or not. Doing so is really boring and
annoying... :/
This patch displays the number of pending group requests at the ACP groups
summary page.

PHPBB3-14253
This commit is contained in:
cunha17
2015-10-28 11:38:14 -02:00
committed by Tristan Darricau
parent 3d03c834d0
commit 57ce891d5f
3 changed files with 11 additions and 4 deletions

View File

@@ -935,7 +935,7 @@ class acp_groups
$db->sql_freeresult($result);
// How many people are in which group?
$sql = 'SELECT COUNT(ug.user_id) AS total_members, ug.group_id
$sql = 'SELECT COUNT(ug.user_id) AS total_members, SUM(ug.user_pending) AS pending_members, ug.group_id
FROM ' . USER_GROUP_TABLE . ' ug
WHERE ' . $db->sql_in_set('ug.group_id', array_keys($lookup)) . '
GROUP BY ug.group_id';
@@ -945,6 +945,7 @@ class acp_groups
{
$type = $lookup[$row['group_id']];
$cached_group_data[$type][$row['group_id']]['total_members'] = $row['total_members'];
$cached_group_data[$type][$row['group_id']]['pending_members'] = $row['pending_members'];
}
$db->sql_freeresult($result);
@@ -973,6 +974,7 @@ class acp_groups
'GROUP_NAME' => $group_name,
'TOTAL_MEMBERS' => $row['total_members'],
'PENDING_MEMBERS' => $row['pending_members']
));
}
}