diff --git a/phpBB/admin/admin_groupauth.php b/phpBB/admin/admin_groupauth.php index fbe89ebd0a..fc2fef5c99 100644 --- a/phpBB/admin/admin_groupauth.php +++ b/phpBB/admin/admin_groupauth.php @@ -76,8 +76,6 @@ $field_names = array( "auth_sticky" => $lang['Sticky'], "auth_announce" => $lang['Announce']); -$forum_auth_key_fields = array("auth_view", "auth_read", "auth_post", "auth_reply"); - // --------------- // Start Functions @@ -478,7 +476,7 @@ if(isset($HTTP_POST_VARS['submit']) && !empty($HTTP_POST_VARS[POST_GROUPS_URL])) { if(!empty($valid_auth_mod_sql[$forum_id])) { - $warning_list .= "" . $warning_mod_username[$forum_id][$i] . " has moderator status on " . $warning_mod_frmname[$forum_id][$i] . "
"; + $warning_list .= "" . $warning_mod_username[$forum_id][$i] . " " . $lang['has_moderator_status'] . " " . $warning_mod_frmname[$forum_id][$i] . "
"; } } } @@ -489,23 +487,23 @@ if(isset($HTTP_POST_VARS['submit']) && !empty($HTTP_POST_VARS[POST_GROUPS_URL])) { if(!empty($valid_auth_prv_sql[$forum_id])) { - $warning_list .= "" . $warning_prv_username[$forum_id][$i] . " has access status to " . $warning_prv_frmname[$forum_id][$i] . "
"; + $warning_list .= "" . $warning_prv_username[$forum_id][$i] . " " . $lang['has_access_status'] . " " . $warning_prv_frmname[$forum_id][$i] . "
"; } } } if($warning_list != "") { - $warning_list = "
The following user/s still have access/moderator rights to this forum via their user auth settings. You may want to alter the user authorisation/s to fully prevent them having access/moderator rights. The users granted rights are noted below.

" . $warning_list . "
Click HERE to return to group auth admin
"; + $warning_list = "
" . $lang['Conflict_message_groupauth'] . "

" . $warning_list . "
" . $lang['Click'] ." " . $lang['HERE'] . " " . $lang['return_group_auth_admin'] . "
"; - $template_header = "admin/page_header.tpl"; include('page_header_admin.'.$phpEx); $template->set_filenames(array( "body" => "admin/admin_message_body.tpl") ); + $template->assign_vars(array( - "MESSAGE_TITLE" => "Authorisation Conflict Warning", + "MESSAGE_TITLE" => $lang['Conflict_warning'], "MESSAGE_TEXT" => $warning_list) ); } @@ -576,9 +574,6 @@ else "body" => "admin/auth_ug_body.tpl") ); - // - // - // $sql = "SELECT f.* FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c WHERE c.cat_id = f.cat_id @@ -593,35 +588,20 @@ else { while(list($forum_id, $forum_row) = each($forum_access)) { - for($j = 0; $j < count($forum_auth_key_fields); $j++) - { - $basic_auth_level[$forum_row['forum_id']] = "public"; + $forum_auth_level[$forum_row['forum_id']] = AUTH_ALL; - if($forum_row[$forum_auth_key_fields[$j]] == AUTH_REG) + for($j = 0; $j < count($forum_auth_fields); $j++) + { + if($forum_row[$forum_auth_fields[$j]] == AUTH_ACL) { - $basic_auth_level[$forum_row['forum_id']] = "registered"; - $basic_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; - } - else if($forum_row[$forum_auth_key_fields[$j]] == AUTH_ACL) - { - $basic_auth_level[$forum_row['forum_id']] = "private"; - $basic_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; - } - else if($forum_row[$forum_auth_key_fields[$j]] == AUTH_MOD) - { - $basic_auth_level[$forum_row['forum_id']] = "moderator"; - $basic_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; - } - else if($forum_row[$forum_auth_key_fields[$j]] == AUTH_ADMIN) - { - $basic_auth_level[$forum_row['forum_id']] = "admin"; - $basic_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; + $forum_auth_level[$forum_row['forum_id']] = AUTH_ACL; + $forum_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; } } } } } - + $sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE g.group_id = $group_id @@ -652,7 +632,6 @@ else for($i = 0; $i < count($forum_access); $i++) { $f_forum_id = $forum_access[$i]['forum_id']; - $is_forum_restricted[$f_forum_id] = 0; for($j = 0; $j < count($forum_auth_fields); $j++) { @@ -723,30 +702,33 @@ else { if( empty($adv) ) { - if($basic_auth_level[$forumkey] == "private") + if($forum_auth_level[$forumkey] == AUTH_ACL) { $allowed = 1; - for($j = 0; $j < count($basic_auth_level_fields[$forumkey]); $j++) + for($j = 0; $j < count($forum_auth_level_fields[$forumkey]); $j++) { - if(!$group_ary[$basic_auth_level_fields[$forumkey][$j]]) + if( !$group_ary[$forum_auth_level_fields[$forumkey][$j]] ) { $allowed = 0; } } + $optionlist_acl = ""; } else @@ -903,7 +885,7 @@ else "L_USER_OR_GROUPNAME" => $lang['Group_name'], - "L_AUTH_TITLE" => $lang['User'] . " " . $lang['Auth_Control'], + "L_AUTH_TITLE" => $lang['Group'] . " " . $lang['Auth_Control'], "L_AUTH_EXPLAIN" => $lang['User_auth_explain'], "L_MODERATOR_STATUS" => $lang['Moderator_status'], "L_PERMISSIONS" => $lang['Permissions'], diff --git a/phpBB/admin/admin_userauth.php b/phpBB/admin/admin_userauth.php index 5219d06578..80d23309cf 100644 --- a/phpBB/admin/admin_userauth.php +++ b/phpBB/admin/admin_userauth.php @@ -76,9 +76,6 @@ $field_names = array( "auth_sticky" => $lang['Sticky'], "auth_announce" => $lang['Announce']); -$forum_auth_key_fields = array("auth_view", "auth_read", "auth_post", "auth_reply"); - - // --------------- // Start Functions // @@ -544,7 +541,7 @@ if(isset($HTTP_POST_VARS['submit']) && !empty($HTTP_POST_VARS[POST_USERS_URL])) { if(!empty($valid_auth_mod_sql[$forum_id])) { - $warning_list .= "" . $warning_mod_grpname[$forum_id][$i] . " grants moderator status to " . $warning_mod_frmname[$forum_id][$i] . " for this user
"; + $warning_list .= "" . $warning_mod_grpname[$forum_id][$i] . " " . $lang['grants_moderator_status'] . " " . $warning_mod_frmname[$forum_id][$i] . " " . $lang['for_this_user'] . "
"; } } } @@ -555,23 +552,23 @@ if(isset($HTTP_POST_VARS['submit']) && !empty($HTTP_POST_VARS[POST_USERS_URL])) { if(!empty($valid_auth_prv_sql[$forum_id])) { - $warning_list .= "" . $warning_prv_grpname[$forum_id][$i] . " grants access status to " . $warning_prv_frmname[$forum_id][$i] . " for this user
"; + $warning_list .= "" . $warning_prv_grpname[$forum_id][$i] . " " . $lang['grants_access_status'] . " " . $warning_prv_frmname[$forum_id][$i] . " " . $lang['for_this_user'] . "
"; } } } if($warning_list != "") { - $warning_list = "
This user still has access/moderator rights to this forum via group membership. You may want to alter the group authorisation or remove this user the group to fully prevent them having access/moderator rights. The groups granting rights are noted below.

" . $warning_list . "
Click HERE to return to user auth admin
"; + $warning_list = "
" . $lang['Conflict_message_userauth'] . "

" . $warning_list . "
" . $lang['Click'] . " " . $lang['HERE'] . " ". $lang['return_user_auth_admin'] . "
"; - $template_header = "admin/page_header.tpl"; include('page_header_admin.'.$phpEx); $template->set_filenames(array( "body" => "admin/admin_message_body.tpl") ); + $template->assign_vars(array( - "MESSAGE_TITLE" => "Authorisation Conflict Warning", + "MESSAGE_TITLE" => $lang['Conflict_warning'], "MESSAGE_TEXT" => $warning_list) ); } @@ -603,7 +600,6 @@ else if(empty($HTTP_GET_VARS[POST_USERS_URL])) } $select_list .= ""; - $template_header = "admin/page_header.tpl"; include('page_header_admin.'.$phpEx); $template->set_filenames(array( @@ -643,7 +639,6 @@ else "body" => "admin/auth_ug_body.tpl") ); - $sql = "SELECT f.* FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c WHERE c.cat_id = f.cat_id @@ -658,29 +653,14 @@ else { while(list($forum_id, $forum_row) = each($forum_access)) { - for($j = 0; $j < count($forum_auth_key_fields); $j++) - { - $basic_auth_level[$forum_row['forum_id']] = "public"; + $forum_auth_level[$forum_row['forum_id']] = AUTH_ALL; - if($forum_row[$forum_auth_key_fields[$j]] == AUTH_REG) + for($j = 0; $j < count($forum_auth_fields); $j++) + { + if($forum_row[$forum_auth_fields[$j]] == AUTH_ACL) { - $basic_auth_level[$forum_row['forum_id']] = "registered"; - $basic_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; - } - else if($forum_row[$forum_auth_key_fields[$j]] == AUTH_ACL) - { - $basic_auth_level[$forum_row['forum_id']] = "private"; - $basic_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; - } - else if($forum_row[$forum_auth_key_fields[$j]] == AUTH_MOD) - { - $basic_auth_level[$forum_row['forum_id']] = "moderator"; - $basic_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; - } - else if($forum_row[$forum_auth_key_fields[$j]] == AUTH_ADMIN) - { - $basic_auth_level[$forum_row['forum_id']] = "admin"; - $basic_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; + $forum_auth_level[$forum_row['forum_id']] = AUTH_ACL; + $forum_auth_level_fields[$forum_row['forum_id']][] = $forum_auth_fields[$j]; } } } @@ -719,7 +699,6 @@ else for($i = 0; $i < count($forum_access); $i++) { $f_forum_id = $forum_access[$i]['forum_id']; - $is_forum_restricted[$f_forum_id] = 0; for($j = 0; $j < count($forum_auth_fields); $j++) { @@ -790,30 +769,33 @@ else { if( empty($adv) ) { - if($basic_auth_level[$forumkey] == "private") + if($forum_auth_level[$forumkey] == AUTH_ACL) { $allowed = 1; - for($j = 0; $j < count($basic_auth_level_fields[$forumkey]); $j++) + for($j = 0; $j < count($forum_auth_level_fields[$forumkey]); $j++) { - if(!$auth_user[$forumkey][$basic_auth_level_fields[$forumkey][$j]]) + if(!$auth_user[$forumkey][$forum_auth_level_fields[$forumkey][$j]]) { $allowed = 0; } } + $optionlist_acl = ""; } else @@ -840,11 +822,11 @@ else { if(!$auth_field_acl[$forum_id][$field_name]) { - $optionlist_acl_adv[$forum_id][$j] .= ""; + $optionlist_acl_adv[$forum_id][$j] .= ""; } else { - $optionlist_acl_adv[$forum_id][$j] .= ""; + $optionlist_acl_adv[$forum_id][$j] .= ""; } } else @@ -855,7 +837,7 @@ else } else { - $optionlist_acl_adv[$forum_id][$j] .= ""; + $optionlist_acl_adv[$forum_id][$j] .= ""; } } @@ -869,19 +851,19 @@ else $optionlist_mod = ""; - $row_class = ($i%2) ? "row2" : "row1"; - $row_color = "#" . ( ( !($i%2) ) ? $theme['td_color1'] : $theme['td_color2'] ); + $row_class = ( !($i%2) ) ? "row2" : "row1"; + $row_color = ( !($i%2) ) ? $theme['td_color1'] : $theme['td_color2']; $template->assign_block_vars("forums", array( - "ROW_COLOR" => $row_color, + "ROW_COLOR" => "#" . $row_color, "ROW_CLASS" => $row_class, "FORUM_NAME" => $forum_access[$i]['forum_name'], @@ -911,7 +893,7 @@ else reset($auth_user); $t_username .= $userinf[0]['username']; - $s_user_type = ($is_admin) ? '' : ''; + $s_user_type = ($is_admin) ? '' : ''; for($i = 0; $i < count($userinf); $i++) { @@ -939,8 +921,8 @@ else $t_usergroup_list = "None"; } - $s_hidden_fields = ""; - $s_hidden_fields .= ""; + $s_hidden_fields = ""; + $s_hidden_fields .= ""; $s_column_span = 2; // Two columns always present if(!$adv) diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index 986b40186c..0f76e40a93 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -110,6 +110,8 @@ $lang['YIM'] = "Yahoo Messenger"; $lang['Error'] = "Error"; +$lang['HERE'] = "HERE"; + $lang['IP_Address'] = "IP Address"; $lang['Jump_to'] = "Jump to"; @@ -705,6 +707,16 @@ $lang['Disallowed_Access'] = "Disallowed Access"; $lang['Is_Moderator'] = "Is Moderator"; $lang['Not_Moderator'] = "Not Moderator"; +$lang['Conflict_warning'] = "Authorisation Conflict Warning"; +$lang['Conflict_message_userauth'] = "This user still has access/moderator rights to this forum via group membership. You may want to alter the group authorisation or remove this user the group to fully prevent them having access/moderator rights. The groups granting rights are noted below."; +$lang['Conflict_message_groupauth'] = "The following user/s still have access/moderator rights to this forum via their user auth settings. You may want to alter the user authorisation/s to fully prevent them having access/moderator rights. The users granted rights are noted below."; + +$lang['has_moderator_status'] = "has moderator status on"; +$lang['has_access_status'] = "has access status to"; +$lang['grants_access_status'] = "grants access status to"; +$lang['grants_moderator_status'] = "grants moderator status to"; +$lang['for_this_user'] = "for this user"; + $lang['Submit_changes'] = "Submit changes"; $lang['Reset_changes'] = "Reset changes"; @@ -731,6 +743,10 @@ $lang['and_belongs_groups'] = "and belongs to the following groups"; // followed $lang['Group_has_members'] = "This group has the following members"; +$lang['return_group_auth_admin'] = "to return to the group permissions panel"; +$lang['return_user_auth_admin'] = "to return to the user permissions panel"; + + // Banning $lang['Ban_control'] = "Ban Control"; $lang['Ban_explain'] = "Here you can control the banning of users. You can achieve this by banning either or both of a specific user or an individual or range of IP addresses or hostnames. These methods prevent a user from even reaching the index page of your board. To prevent a user from registering under a different username you can also specify a banned email address. Please note that banning an email address alone will not prevent that user from being able to logon or post to your board, you should use one of the first two methods to achieve this.";