diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-10-30 16:20:11 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-10-30 16:20:11 +0000 |
commit | c44f6ca080c944b57dc912de8708e5239c1543a2 (patch) | |
tree | 812e6cdb05ee83c0270f8d72d2e064adcb75064a /phpBB/memberlist.php | |
parent | 7e55e53d10702a9d8af8a70685801aa486fab3dc (diff) | |
download | forums-c44f6ca080c944b57dc912de8708e5239c1543a2.tar forums-c44f6ca080c944b57dc912de8708e5239c1543a2.tar.gz forums-c44f6ca080c944b57dc912de8708e5239c1543a2.tar.bz2 forums-c44f6ca080c944b57dc912de8708e5239c1543a2.tar.xz forums-c44f6ca080c944b57dc912de8708e5239c1543a2.zip |
some fixes
git-svn-id: file:///svn/phpbb/trunk@6538 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r-- | phpBB/memberlist.php | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index f50e79ed21..fa297d5b89 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -52,7 +52,8 @@ switch ($mode) $start = request_var('start', 0); $submit = (isset($_POST['submit'])) ? true : false; -$sort_key = request_var('sk', 'c'); +$default_key = 'c'; +$sort_key = request_var('sk', $default_key); $sort_dir = request_var('sd', 'a'); @@ -168,6 +169,7 @@ switch ($mode) } $s_forum_select = ''; + $undisclosed_forum = false; if (isset($forum_id_ary[$row['user_id']])) { @@ -175,14 +177,28 @@ switch ($mode) { foreach ($forum_id_ary[$row['user_id']] as $forum_id) { - if (isset($forums[$forum_id]) && $auth->acl_get('f_list', $forum_id)) + if (isset($forums[$forum_id])) { - $s_forum_select .= '<option value="">' . $forums[$forum_id] . '</option>'; + if ($auth->acl_get('f_list', $forum_id)) + { + $s_forum_select .= '<option value="">' . $forums[$forum_id] . '</option>'; + } + else + { + $undisclosed_forum = true; + } } } } } + // If the mod is only moderating non-viewable forums let us display this circumstance + // instead of saying they are moderating all forums + if (!$s_forum_select && $undisclosed_forum) + { + $s_forum_select = $user->lang['FORUM_UNDISCLOSED']; + } + 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['GROUP_UNDISCLOSED']; @@ -1049,6 +1065,11 @@ switch ($mode) } // Sorting and order + if (!isset($sort_key_sql[$sort_key])) + { + $sort_key = $default_key; + } + $order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'); // Count the users ... |