diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 1 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_groups.php | 5 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_permissions.php | 5 | ||||
-rw-r--r-- | phpBB/includes/functions_admin.php | 12 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 2 |
5 files changed, 18 insertions, 7 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 4c002357bd..912e9c9af3 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -74,6 +74,7 @@ class acp_board 'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'type' => 'radio:yes_no', 'explain' => true), 'coppa_mail' => array('lang' => 'COPPA_MAIL', 'type' => 'textarea:5:40', 'explain' => true), 'coppa_fax' => array('lang' => 'COPPA_FAX', 'type' => 'text:25:100', 'explain' => false), + 'coppa_hide_groups' => array('lang' => 'COPPA_HIDE_GROUPS', 'type' => 'radio:yes_no', 'explain' => true), 'legend3' => 'REGISTRATION', 'require_activation'=> array('lang' => 'ACC_ACTIVATION', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true), diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index f190f151c9..aad8997395 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -564,7 +564,10 @@ class acp_groups $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); $leader = $member = 0; - $group_data = array(); + $group_data = array( + 'leader' => array(), + 'member' => array(), + ); while ($row = $db->sql_fetchrow($result)) { diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index b146e09a91..2d855c0c08 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -51,9 +51,12 @@ class acp_permissions if ($select_all_groups) { // Add default groups to selection + $sql_and = ($config['coppa_hide_groups']) ? " AND group_name NOT IN ('INACTIVE_COPPA', 'REGISTERED_COPPA')" : ''; + $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . ' - WHERE group_type = ' . GROUP_SPECIAL; + WHERE group_type = ' . GROUP_SPECIAL . " + $sql_and"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 8391fcffc4..240336583f 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -209,12 +209,16 @@ function size_select_options($size_compare) */ function group_select_options($group_id, $exclude_ids = false) { - global $db, $user; + global $db, $user, $config; + + $exclude_sql = ($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE group_id NOT IN (' . implode(', ', array_map('intval', $exclude_ids)) . ')' : ''; + $sql_and = ($config['coppa_hide_groups']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name NOT IN ('INACTIVE_COPPA', 'REGISTERED_COPPA')" : ''; $sql = 'SELECT group_id, group_name, group_type - FROM ' . GROUPS_TABLE . ' - ' . (($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE group_id NOT IN (' . implode(', ', array_map('intval', $exclude_ids)) . ')' : '') . ' - ORDER BY group_type DESC, group_name ASC'; + FROM ' . GROUPS_TABLE . " + $exclude_sql + $sql_and + ORDER BY group_type DESC, group_name ASC"; $result = $db->sql_query($sql); $s_group_options = ''; diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 31914917f9..0ac9290c15 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -204,7 +204,7 @@ class ucp_register $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " - WHERE group_name = '$group_name' + WHERE group_name = '" . $db->sql_escape($group_name) . "' AND group_type = " . GROUP_SPECIAL; $result = $db->sql_query($sql); |