aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-06-17 11:28:21 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-06-17 11:28:21 +0000
commit10846d462ac9aa4790157f02e6cbf76297c29b82 (patch)
treebafc6eb7aac2f104cfa055163b2def8b65887ac6
parentf04a3349e66984506ab71f0506d718188022e03f (diff)
downloadforums-10846d462ac9aa4790157f02e6cbf76297c29b82.tar
forums-10846d462ac9aa4790157f02e6cbf76297c29b82.tar.gz
forums-10846d462ac9aa4790157f02e6cbf76297c29b82.tar.bz2
forums-10846d462ac9aa4790157f02e6cbf76297c29b82.tar.xz
forums-10846d462ac9aa4790157f02e6cbf76297c29b82.zip
fix bugs #2271 and #2273
git-svn-id: file:///svn/phpbb/trunk@6081 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/acp/acp_email.php2
-rw-r--r--phpBB/includes/acp/acp_permissions.php1
-rw-r--r--phpBB/includes/auth.php1
-rw-r--r--phpBB/includes/functions_admin.php1
-rw-r--r--phpBB/includes/functions_privmsgs.php3
-rw-r--r--phpBB/includes/ucp/ucp_groups.php2
-rw-r--r--phpBB/language/en/groups.php14
-rw-r--r--phpBB/memberlist.php4
8 files changed, 16 insertions, 12 deletions
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index ec15d4e0df..62a86eed19 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -70,7 +70,7 @@ class acp_email
$sql = 'SELECT u.user_email, u.username, u.user_lang, u.user_jabber, u.user_notify_type
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
WHERE ug.group_id = $group_id
- AND ug.user_pending <> 1
+ AND ug.user_pending = 0
AND u.user_id = ug.user_id
AND u.user_allow_massemail = 1
ORDER BY u.user_lang, u.user_notify_type";
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index 00722255c1..277281497b 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -968,6 +968,7 @@ class acp_permissions
FROM ' . GROUPS_TABLE . ' g
LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (ug.group_id = g.group_id)
WHERE ug.user_id = ' . $user_id . '
+ AND ug.user_pending = 0
ORDER BY g.group_type DESC, g.group_id DESC';
$result = $db->sql_query($sql);
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
index 262c1ffaf7..884f58ef0a 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/includes/auth.php
@@ -541,6 +541,7 @@ class auth
'WHERE' => '(ao.auth_option_id = a.auth_option_id OR ao.auth_option_id = r.auth_option_id)
AND a.group_id = ug.group_id
+ AND ug.user_pending = 0
' . (($sql_user) ? 'AND ug.' . $sql_user : '') . "
$sql_forum
$sql_opts",
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index f655cf9ae0..a83e34e09a 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -1913,6 +1913,7 @@ function cache_moderators()
OR r.auth_setting = ' . ACL_NO . ')
AND a.group_id = ug.group_id
AND ug.user_id IN (' . implode(', ', $ug_id_ary) . ")
+ AND ug.user_pending = 0
AND o.auth_option LIKE 'm\_%'",
));
$result = $db->sql_query($sql);
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index a8d0932d2a..7a9cdfb322 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -387,7 +387,8 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
{
$sql = 'SELECT *
FROM ' . USER_GROUP_TABLE . '
- WHERE user_id IN (' . implode(', ', $user_ids) . ')';
+ WHERE user_id IN (' . implode(', ', $user_ids) . ')
+ AND user_pending = 0';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index def101bc5b..23dda1438f 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -259,7 +259,7 @@ class ucp_groups
}
}
- $sql = 'SELECT g.group_id, g.group_name, g.group_desc, g.group_desc_uid, g.group_desc_bitfield, g.group_type, ug.group_leader, ug.user_pending
+ $sql = 'SELECT g.*, ug.group_leader, ug.user_pending
FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
WHERE ug.user_id = ' . $user->data['user_id'] . '
AND g.group_id = ug.group_id
diff --git a/phpBB/language/en/groups.php b/phpBB/language/en/groups.php
index a7b34e67c1..07b566f3fe 100644
--- a/phpBB/language/en/groups.php
+++ b/phpBB/language/en/groups.php
@@ -40,12 +40,18 @@ $lang = array_merge($lang, array(
'GROUP_DESC' => 'Group description',
'GROUP_HIDDEN' => 'Hidden',
'GROUP_INFORMATION' => 'Usergroup Information',
+ 'GROUP_IS_CLOSED' => 'This is a closed group, new members cannot automatically join.',
+ 'GROUP_IS_FREE' => 'This is a freely open group, all new members are welcome.',
+ 'GROUP_IS_HIDDEN' => 'This is a hidden group, only members of this group can view its membership.',
+ 'GROUP_IS_OPEN' => 'This is an open group, members can apply to join.',
+ 'GROUP_IS_SPECIAL' => 'This is a special group, special groups are managed by the board administrators.',
'GROUP_JOIN' => 'Join Group',
'GROUP_JOIN_CONFIRM' => 'Are you sure you want to join the selected group?',
'GROUP_JOIN_PENDING' => 'Request to join group',
'GROUP_JOIN_PENDING_CONFIRM' => 'Are you sure you want to request joining the selected group?',
'GROUP_JOINED' => 'Successfully joined selected group',
'GROUP_JOINED_PENDING' => 'Successfully requested group membership. Please wait for a group leader to approve your membership.',
+ 'GROUP_LIST' => 'Manage Users',
'GROUP_MEMBERS' => 'Group members',
'GROUP_NAME' => 'Group name',
'GROUP_OPEN' => 'Open',
@@ -57,13 +63,7 @@ $lang = array_merge($lang, array(
'GROUP_RESIGNED_MEMBERSHIP' => 'You were successfully removed from the selected group',
'GROUP_RESIGNED_PENDING' => 'Your pending membership was successfully removed from the selected group',
'GROUP_TYPE' => 'Group type',
- 'GROUP_IS_CLOSED' => 'This is a closed group, new members cannot automatically join.',
- 'GROUP_IS_OPEN' => 'This is an open group, members can apply to join.',
- 'GROUP_IS_HIDDEN' => 'This is a hidden group, only members of this group can view its membership.',
- 'GROUP_IS_FREE' => 'This is a freely open group, all new members are welcome.',
- 'GROUP_IS_SPECIAL' => 'This is a special group, special groups are managed by the board administrators.',
-
- 'GROUP_LIST' => 'Manage Users',
+ 'GROUP_UNDISCLOSED' => 'Hidden group',
'LOGIN_EXPLAIN_GROUP' => 'You need to login to view group details',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index d9c1192868..d7eed90dd2 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -123,7 +123,7 @@ switch ($mode)
'LEFT_JOIN' => array(
array(
'FROM' => array(USER_GROUP_TABLE => 'ug'),
- 'ON' => 'ug.group_id = g.group_id AND ug.user_id = ' . $user->data['user_id']
+ 'ON' => 'ug.group_id = g.group_id AND ug.user_pending = 0 AND ug.user_id = ' . $user->data['user_id']
)
),
@@ -157,7 +157,7 @@ switch ($mode)
if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
{
- $group_name = $user->lang['UNDISCLOSED'];
+ $group_name = $user->lang['GROUP_UNDISCLOSED'];
$u_group = '';
}
else