aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_permission_roles.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-06-16 16:54:51 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-06-16 16:54:51 +0000
commitb0c3e3958220c04cbb4f25f0c24b53b65a34e360 (patch)
tree6c23cb4352a297b4dade2b3a1aa6706b89a53c82 /phpBB/includes/acp/acp_permission_roles.php
parenta3c9182e0f9efeb193f5ef682d1945382f234eb3 (diff)
downloadforums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar
forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar.gz
forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar.bz2
forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar.xz
forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.zip
- removed db cache (might re-appear, but for now we do not see the need for it)
- all changes to styles/subsilver/template are purely cosmetic (no functional changes) - cosmetics - bugfixes - add index to modules table - use modules ordering code for forums too git-svn-id: file:///svn/phpbb/trunk@6073 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_permission_roles.php')
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index 8022498f67..1681986a36 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -128,6 +128,8 @@ class acp_permission_roles
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
}
+ // no break;
+
case 'add':
$role_name = request_var('role_name', '', true);
@@ -178,7 +180,7 @@ class acp_permission_roles
$db->sql_freeresult($result);
$sql_ary['role_order'] = $max_order + 1;
-
+
$sql = 'INSERT INTO ' . ACL_ROLES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
@@ -193,7 +195,6 @@ class acp_permission_roles
trigger_error($user->lang['ROLE_' . strtoupper($action) . '_SUCCESS'] . adm_back_link($this->u_action));
break;
-
}
}
@@ -243,6 +244,8 @@ class acp_permission_roles
$db->sql_freeresult($result);
}
+ // no break;
+
case 'edit':
if ($action == 'edit')
@@ -284,13 +287,13 @@ class acp_permission_roles
'U_ACTION' => $this->u_action . "&amp;action={$action}&amp;role_id={$role_id}",
'U_BACK' => $this->u_action,
-
+
'ROLE_NAME' => $role_row['role_name'],
'ROLE_DESCRIPTION' => $role_row['role_description'],
'L_ACL_TYPE' => $user->lang['ACL_TYPE_' . strtoupper($permission_type)],
)
);
-
+
// We need to fill the auth options array with ACL_UNSET options ;)
$sql = 'SELECT auth_option_id, auth_option
FROM ' . ACL_OPTIONS_TABLE . "
@@ -348,7 +351,7 @@ class acp_permission_roles
break;
}
- // By default, check that image_order is valid and fix it if necessary
+ // By default, check that role_order is valid and fix it if necessary
$sql = 'SELECT role_id, role_order
FROM ' . ACL_ROLES_TABLE . "
WHERE role_type = '" . $db->sql_escape($permission_type) . "'
@@ -430,12 +433,12 @@ class acp_permission_roles
$content_array = $categories = array();
$key_sort_array = array(0);
$auth_options = array(0 => $auth_options);
-
+
// Making use of auth_admin method here (we do not really want to change two similar code fragments)
auth_admin::build_permission_array($auth_options, $content_array, $categories, $key_sort_array);
$content_array = $content_array[0];
-
+
$template->assign_var('S_NUM_PERM_COLS', sizeof($categories));
// Assign to template
@@ -448,7 +451,7 @@ class acp_permission_roles
'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_YES'] && !$cat_array['S_UNSET']) ? true : false,
'S_UNSET' => ($cat_array['S_UNSET'] && !$cat_array['S_NO'] && !$cat_array['S_YES']) ? true : false)
);
-
+
foreach ($cat_array['permissions'] as $permission => $allowed)
{
$template->assign_block_vars('auth.mask', array(
@@ -471,7 +474,7 @@ class acp_permission_roles
global $db;
$auth_admin = new auth_admin();
-
+
// Get complete auth array
$sql = 'SELECT auth_option, auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "