aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/memberlist.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-04-22 16:18:40 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-04-22 16:18:40 +0000
commit856650861f0c454b800fe816ba2592444ef13894 (patch)
treed73a41902d1d58784c7502c94ce4d03998131e0a /phpBB/memberlist.php
parent68c349fdc1ad29ff3c80961297db31b1e725973f (diff)
downloadforums-856650861f0c454b800fe816ba2592444ef13894.tar
forums-856650861f0c454b800fe816ba2592444ef13894.tar.gz
forums-856650861f0c454b800fe816ba2592444ef13894.tar.bz2
forums-856650861f0c454b800fe816ba2592444ef13894.tar.xz
forums-856650861f0c454b800fe816ba2592444ef13894.zip
- removed group settings from roles
- added forum icon in front of forums in permissions acp - added trace permissions in permission masks (thanks naderman for writing the first code and for the idea... :)) - some bugfixes - PHP6 fix git-svn-id: file:///svn/phpbb/trunk@5824 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r--phpBB/memberlist.php41
1 files changed, 34 insertions, 7 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 50ea8d789a..c19e71c05b 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -77,7 +77,15 @@ switch ($mode)
{
foreach ($forum_ary as $auth_option => $id_ary)
{
- (!$forum_id && $auth_option == 'a_') ? $admin_id_ary += $id_ary : $mod_id_ary += $id_ary;
+ if (!$forum_id && $auth_option == 'a_')
+ {
+ $admin_id_ary = array_merge($admin_id_ary, $id_ary);
+ continue;
+ }
+ else
+ {
+ $mod_id_ary = array_merge($mod_id_ary, $id_ary);
+ }
if ($forum_id)
{
@@ -89,6 +97,9 @@ switch ($mode)
}
}
+ $admin_id_ary = array_unique($admin_id_ary);
+ $mod_id_ary = array_unique($mod_id_ary);
+
$sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST;
@@ -104,7 +115,7 @@ switch ($mode)
$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_rank, u.user_posts, g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id as ug_user_id
FROM (' . USERS_TABLE . ' u, ' . GROUPS_TABLE . ' g)
LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (ug.group_id = g.group_id AND ug.user_id = ' . $user->data['user_id'] . ')
- WHERE u.user_id IN (' . implode(', ', $admin_id_ary + $mod_id_ary) . ')
+ WHERE u.user_id IN (' . implode(', ', array_unique(array_merge($admin_id_ary, $mod_id_ary))) . ')
AND u.group_id = g.group_id
GROUP BY u.user_id
ORDER BY g.group_name ASC, u.username ASC';
@@ -492,14 +503,30 @@ switch ($mode)
trigger_error('NO_TOPIC');
}
- if (!$auth->acl_get('f_read', $row['forum_id']))
+ if ($row['forum_id'])
{
- trigger_error('NO_FORUM_READ');
- }
+ if (!$auth->acl_get('f_read', $row['forum_id']))
+ {
+ trigger_error($user->lang['SORRY_AUTH_READ']);
+ }
- if (!$auth->acl_get('f_email', $row['forum_id']))
+ if (!$auth->acl_get('f_email', $row['forum_id']))
+ {
+ trigger_error('NO_EMAIL');
+ }
+ }
+ else
{
- trigger_error('NO_EMAIL');
+ // If global announcement, we need to check if the user is able to at least read and email in one forum...
+ if (!$auth->acl_getf_global('f_read'))
+ {
+ trigger_error($user->lang['SORRY_AUTH_READ']);
+ }
+
+ if (!$auth->acl_getf_global('f_email'))
+ {
+ trigger_error('NO_EMAIL');
+ }
}
}
else