aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcunha17 <cunha17@gmail.com>2015-10-28 11:38:14 -0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-01-25 13:13:05 +0100
commit57ce891d5f2c0b7090d44fac074ab27b4f98b93b (patch)
treee9dc32d613daed8a8175119a9430ef07493004c2
parent3d03c834d026ef43cce2a4de90cf2e70df5c3fdd (diff)
downloadforums-57ce891d5f2c0b7090d44fac074ab27b4f98b93b.tar
forums-57ce891d5f2c0b7090d44fac074ab27b4f98b93b.tar.gz
forums-57ce891d5f2c0b7090d44fac074ab27b4f98b93b.tar.bz2
forums-57ce891d5f2c0b7090d44fac074ab27b4f98b93b.tar.xz
forums-57ce891d5f2c0b7090d44fac074ab27b4f98b93b.zip
[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
-rw-r--r--phpBB/adm/style/acp_groups.html9
-rw-r--r--phpBB/includes/acp/acp_groups.php4
-rw-r--r--phpBB/language/en/acp/groups.php2
3 files changed, 11 insertions, 4 deletions
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html
index 23f6e744c0..ffde27a437 100644
--- a/phpBB/adm/style/acp_groups.html
+++ b/phpBB/adm/style/acp_groups.html
@@ -267,11 +267,12 @@
<!-- EVENT acp_groups_manage_before -->
<table class="table1">
- <col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
+ <col class="col1" /><col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
<thead>
<tr>
<th style="width: 50%">{L_GROUP}</th>
<th>{L_TOTAL_MEMBERS}</th>
+ <th>{L_PENDING_MEMBERS}</th>
<th colspan="2">{L_OPTIONS}</th>
<th>{L_ACTION}</th>
</tr>
@@ -281,7 +282,7 @@
<!-- IF groups.S_SPECIAL -->
<!-- IF groups.S_FIRST_ROW -->
<tr>
- <td colspan="5" class="row3">{L_NO_GROUPS_CREATED}</td>
+ <td colspan="6" class="row3">{L_NO_GROUPS_CREATED}</td>
</tr>
<!-- ENDIF -->
</tbody>
@@ -302,11 +303,12 @@
<p>{L_SPECIAL_GROUPS_EXPLAIN}</p>
<table class="table1">
- <col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
+ <col class="col1" /><col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" />
<thead>
<tr>
<th style="width: 50%">{L_GROUP}</th>
<th>{L_TOTAL_MEMBERS}</th>
+ <th>{L_PENDING_MEMBERS}</th>
<th colspan="2">{L_OPTIONS}</th>
<th>{L_ACTION}</th>
</tr>
@@ -316,6 +318,7 @@
<tr>
<td><strong>{groups.GROUP_NAME}</strong></td>
<td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
+ <td style="text-align: center;">{groups.PENDING_MEMBERS}</td>
<td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td>
<td style="text-align: center;"><a href="{groups.U_LIST}">{L_MEMBERS}</a></td>
<td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 223dd06987..ba39a1a60c 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -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']
));
}
}
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index 421075ce5e..9d0bb5f8b9 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -130,6 +130,8 @@ $lang = array_merge($lang, array(
'NO_USERS_ADDED' => 'No users were added to the group.',
'NO_VALID_USERS' => 'You haven’t entered any users eligible for that action.',
+ 'PENDING_MEMBERS' => 'Pending',
+
'SELECT_GROUP' => 'Select a group',
'SPECIAL_GROUPS' => 'Pre-defined groups',
'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings.',