1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

Unused Code inside function update_forum_data [Bug #6606]

Copy permissions protection for groups [Bug #6594]
HTML issues in ACP [Bug #6580, #6578]
Always send the correct encoding [related to bug #6576]
Mass email fixes for first loop iteration [Bug #6570]
Extension groups to be allowed in PM's and/or Posts [Bug #6558]
Extension allowance checking clarified (no longer using forum id 0 for private messaging)
Using request_var() array method for some variables [Bug #6556]
Added confirmation for deletion of ranks/smilies/icons/word censores [Bug #6548, #6530, #6512, #6466]
Only show postable forums in dropdown list for moving posts on forum deletion as well as correct re-indexing [Bug #6510, #6476, #6384]
Jabber password being password field in jabber settings screen [Bug #6478]
user activity language variable if viewing not own profile [Bug #6432]
Show moderator group/user-name colour [Bug #6402]
Log rank creation/updating/removing [Bug #6398]
Update check permission changed from a_ to a_board [Bug #6392]


git-svn-id: file:///svn/phpbb/trunk@6816 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-12-27 17:43:55 +00:00
parent b9da985180
commit 945afbc5fa
41 changed files with 371 additions and 267 deletions

View File

@@ -200,19 +200,27 @@ function size_select_options($size_compare)
}
/**
* Generate list of groups
* Generate list of groups (option fields without select)
*
* @param int $group_id The default group id to mark as selected
* @param array $exclude_ids The group ids to exclude from the list, false (default) if you whish to exclude no id
* @param int $manage_founder If set to false (default) all groups are returned, if 0 only those groups returned not being managed by founders only, if 1 only those groups returned managed by founders only.
*
* @return string The list of options.
*/
function group_select_options($group_id, $exclude_ids = false)
function group_select_options($group_id, $exclude_ids = false, $manage_founder = false)
{
global $db, $user, $config;
$exclude_sql = ($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE ' . $db->sql_in_set('group_id', array_map('intval', $exclude_ids), true) : '';
$sql_and = (!$config['coppa_enable']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name <> 'REGISTERED_COPPA'" : '';
$sql_founder = ($manage_founder !== false) ? (($exclude_sql || $sql_and) ? ' AND ' : ' WHERE ') . 'group_founder_manage = ' . (int) $manage_founder : '';
$sql = 'SELECT group_id, group_name, group_type
FROM ' . GROUPS_TABLE . "
$exclude_sql
$sql_and
$sql_founder
ORDER BY group_type DESC, group_name ASC";
$result = $db->sql_query($sql);