aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-06-22 16:49:04 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-06-22 16:49:04 +0000
commit8b1555c15bbfe153570600f95259fb286db4cdee (patch)
tree82d2d4b326be82368f5535b74aeb706bc5f5da01 /phpBB/includes
parent725b21f2d206efb4b34eb95ec3329bc81f66b805 (diff)
downloadforums-8b1555c15bbfe153570600f95259fb286db4cdee.tar
forums-8b1555c15bbfe153570600f95259fb286db4cdee.tar.gz
forums-8b1555c15bbfe153570600f95259fb286db4cdee.tar.bz2
forums-8b1555c15bbfe153570600f95259fb286db4cdee.tar.xz
forums-8b1555c15bbfe153570600f95259fb286db4cdee.zip
change ACL_NO to ACL_NEVER and ACL_UNSET to ACL_NO to let our users get what is meant on the first look.
the downside is that the information is no more accurate (permissions are still unset, defaulting to no) - someone might to overlook all explanations. :) git-svn-id: file:///svn/phpbb/trunk@6115 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php16
-rw-r--r--phpBB/includes/acp/acp_permissions.php84
-rw-r--r--phpBB/includes/acp/acp_users.php4
-rw-r--r--phpBB/includes/acp/auth.php32
-rw-r--r--phpBB/includes/auth.php14
-rw-r--r--phpBB/includes/constants.php4
-rw-r--r--phpBB/includes/functions_admin.php6
7 files changed, 80 insertions, 80 deletions
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index 1681986a36..2026aebaf0 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -239,7 +239,7 @@ class acp_permission_roles
$auth_options = array();
while ($row = $db->sql_fetchrow($result))
{
- $auth_options[$row['auth_option']] = ACL_UNSET;
+ $auth_options[$row['auth_option']] = ACL_NO;
}
$db->sql_freeresult($result);
}
@@ -294,7 +294,7 @@ class acp_permission_roles
)
);
- // We need to fill the auth options array with ACL_UNSET options ;)
+ // We need to fill the auth options array with ACL_NO options ;)
$sql = 'SELECT auth_option_id, auth_option
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '{$permission_type}%'
@@ -306,7 +306,7 @@ class acp_permission_roles
{
if (!isset($auth_options[$row['auth_option']]))
{
- $auth_options[$row['auth_option']] = ACL_UNSET;
+ $auth_options[$row['auth_option']] = ACL_NO;
}
}
$db->sql_freeresult($result);
@@ -447,17 +447,17 @@ class acp_permission_roles
$template->assign_block_vars('auth', array(
'CAT_NAME' => $user->lang['permission_cat'][$cat],
- 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NO'] && !$cat_array['S_UNSET']) ? true : false,
- '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)
+ 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
+ 'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
+ 'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false)
);
foreach ($cat_array['permissions'] as $permission => $allowed)
{
$template->assign_block_vars('auth.mask', array(
'S_YES' => ($allowed == ACL_YES) ? true : false,
+ 'S_NEVER' => ($allowed == ACL_NEVER) ? true : false,
'S_NO' => ($allowed == ACL_NO) ? true : false,
- 'S_UNSET' => ($allowed == ACL_UNSET) ? true : false,
'FIELD_NAME' => $permission,
'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
@@ -484,7 +484,7 @@ class acp_permission_roles
$auth_settings = array();
while ($row = $db->sql_fetchrow($result))
{
- $auth_settings[$row['auth_option']] = ACL_UNSET;
+ $auth_settings[$row['auth_option']] = ACL_NO;
}
$db->sql_freeresult($result);
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index 04766eccab..76edb094da 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -500,7 +500,7 @@ class acp_permissions
'S_SETTING_PERMISSIONS' => true)
);
- $hold_ary = $auth_admin->get_mask('set', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_UNSET);
+ $hold_ary = $auth_admin->get_mask('set', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NO);
$auth_admin->display_mask('set', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
}
else
@@ -509,7 +509,7 @@ class acp_permissions
'S_VIEWING_PERMISSIONS' => true)
);
- $hold_ary = $auth_admin->get_mask('view', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NO);
+ $hold_ary = $auth_admin->get_mask('view', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NEVER);
$auth_admin->display_mask('view', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
}
}
@@ -786,10 +786,10 @@ class acp_permissions
}
$db->sql_freeresult($result);
- // We need to add any ACL_UNSET setting from auth_settings to compare correctly
+ // We need to add any ACL_NO setting from auth_settings to compare correctly
foreach ($auth_settings as $option => $setting)
{
- if ($setting == ACL_UNSET)
+ if ($setting == ACL_NO)
{
$test_auth_settings[$option] = $setting;
}
@@ -963,8 +963,8 @@ class acp_permissions
'WHO' => $user->lang['DEFAULT'],
'INFORMATION' => $user->lang['TRACE_DEFAULT'],
- 'S_SETTING_UNSET' => true,
- 'S_TOTAL_UNSET' => true)
+ 'S_SETTING_NO' => true,
+ 'S_TOTAL_NO' => true)
);
$sql = 'SELECT DISTINCT g.group_name, g.group_id, g.group_type
@@ -979,13 +979,13 @@ class acp_permissions
while ($row = $db->sql_fetchrow($result))
{
$groups[$row['group_id']] = array(
- 'auth_setting' => ACL_UNSET,
+ 'auth_setting' => ACL_NO,
'group_name' => ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']
);
}
$db->sql_freeresult($result);
- $total = ACL_UNSET;
+ $total = ACL_NO;
if (sizeof($groups))
{
// Get group auth settings
@@ -1001,18 +1001,18 @@ class acp_permissions
{
switch ($row['auth_setting'])
{
- case ACL_UNSET:
- $information = $user->lang['TRACE_GROUP_UNSET'];
+ case ACL_NO:
+ $information = $user->lang['TRACE_GROUP_NO'];
break;
case ACL_YES:
- $information = ($total == ACL_YES) ? $user->lang['TRACE_GROUP_YES_TOTAL_YES'] : (($total == ACL_NO) ? $user->lang['TRACE_GROUP_YES_TOTAL_NO'] : $user->lang['TRACE_GROUP_YES_TOTAL_UNSET']);
- $total = ($total == ACL_UNSET) ? ACL_YES : $total;
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_GROUP_YES_TOTAL_YES'] : (($total == ACL_NEVER) ? $user->lang['TRACE_GROUP_YES_TOTAL_NEVER'] : $user->lang['TRACE_GROUP_YES_TOTAL_NO']);
+ $total = ($total == ACL_NO) ? ACL_YES : $total;
break;
- case ACL_NO:
- $information = ($total == ACL_YES) ? $user->lang['TRACE_GROUP_NO_TOTAL_YES'] : (($total == ACL_NO) ? $user->lang['TRACE_GROUP_NO_TOTAL_NO'] : $user->lang['TRACE_GROUP_NO_TOTAL_UNSET']);
- $total = ACL_NO;
+ case ACL_NEVER:
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_GROUP_NEVER_TOTAL_YES'] : (($total == ACL_NEVER) ? $user->lang['TRACE_GROUP_NEVER_TOTAL_NEVER'] : $user->lang['TRACE_GROUP_NEVER_TOTAL_NO']);
+ $total = ACL_NEVER;
break;
}
@@ -1020,35 +1020,35 @@ class acp_permissions
'WHO' => $row['group_name'],
'INFORMATION' => $information,
- 'S_SETTING_UNSET' => ($row['auth_setting'] == ACL_UNSET) ? true : false,
- 'S_SETTING_YES' => ($row['auth_setting'] == ACL_YES) ? true : false,
'S_SETTING_NO' => ($row['auth_setting'] == ACL_NO) ? true : false,
- 'S_TOTAL_UNSET' => ($total == ACL_UNSET) ? true : false,
+ 'S_SETTING_YES' => ($row['auth_setting'] == ACL_YES) ? true : false,
+ 'S_SETTING_NEVER' => ($row['auth_setting'] == ACL_NEVER) ? true : false,
+ 'S_TOTAL_NO' => ($total == ACL_NO) ? true : false,
'S_TOTAL_YES' => ($total == ACL_YES) ? true : false,
- 'S_TOTAL_NO' => ($total == ACL_NO) ? true : false)
+ 'S_TOTAL_NEVER' => ($total == ACL_NEVER) ? true : false)
);
}
}
// Get user specific permission...
$hold_ary = $auth->acl_user_raw_data($user_id, $permission, $forum_id);
- $auth_setting = (!sizeof($hold_ary)) ? ACL_UNSET : $hold_ary[$user_id][$forum_id][$permission];
+ $auth_setting = (!sizeof($hold_ary)) ? ACL_NO : $hold_ary[$user_id][$forum_id][$permission];
switch ($auth_setting)
{
- case ACL_UNSET:
- $information = ($total == ACL_UNSET) ? $user->lang['TRACE_USER_UNSET_TOTAL_UNSET'] : $user->lang['TRACE_USER_KEPT'];
- $total = ($total == ACL_UNSET) ? ACL_NO : $total;
+ case ACL_NO:
+ $information = ($total == ACL_NO) ? $user->lang['TRACE_USER_NO_TOTAL_NO'] : $user->lang['TRACE_USER_KEPT'];
+ $total = ($total == ACL_NO) ? ACL_NEVER : $total;
break;
case ACL_YES:
- $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_YES_TOTAL_YES'] : (($total == ACL_NO) ? $user->lang['TRACE_USER_YES_TOTAL_NO'] : $user->lang['TRACE_USER_YES_TOTAL_UNSET']);
- $total = ($total == ACL_UNSET) ? ACL_YES : $total;
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_YES_TOTAL_YES'] : (($total == ACL_NEVER) ? $user->lang['TRACE_USER_YES_TOTAL_NEVER'] : $user->lang['TRACE_USER_YES_TOTAL_NO']);
+ $total = ($total == ACL_NO) ? ACL_YES : $total;
break;
- case ACL_NO:
- $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_NO_TOTAL_YES'] : (($total == ACL_NO) ? $user->lang['TRACE_USER_NO_TOTAL_NO'] : $user->lang['TRACE_USER_NO_TOTAL_UNSET']);
- $total = ACL_NO;
+ case ACL_NEVER:
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_NEVER_TOTAL_YES'] : (($total == ACL_NEVER) ? $user->lang['TRACE_USER_NEVER_TOTAL_NEVER'] : $user->lang['TRACE_USER_NEVER_TOTAL_NO']);
+ $total = ACL_NEVER;
break;
}
@@ -1056,12 +1056,12 @@ class acp_permissions
'WHO' => $userdata['username'],
'INFORMATION' => $information,
- 'S_SETTING_UNSET' => ($auth_setting == ACL_UNSET) ? true : false,
- 'S_SETTING_YES' => ($auth_setting == ACL_YES) ? true : false,
'S_SETTING_NO' => ($auth_setting == ACL_NO) ? true : false,
- 'S_TOTAL_UNSET' => false,
+ 'S_SETTING_YES' => ($auth_setting == ACL_YES) ? true : false,
+ 'S_SETTING_NEVER' => ($auth_setting == ACL_NEVER) ? true : false,
+ 'S_TOTAL_NO' => false,
'S_TOTAL_YES' => ($total == ACL_YES) ? true : false,
- 'S_TOTAL_NO' => ($total == ACL_NO) ? true : false)
+ 'S_TOTAL_NEVER' => ($total == ACL_NEVER) ? true : false)
);
// global permission might overwrite local permission
@@ -1080,24 +1080,24 @@ class acp_permissions
if ($auth_setting)
{
- $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_YES'] : $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_NO'];
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_YES'] : $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_NEVER'];
$total = ACL_YES;
}
else
{
- $information = $user->lang['TRACE_USER_GLOBAL_NO_TOTAL_KEPT'];
+ $information = $user->lang['TRACE_USER_GLOBAL_NEVER_TOTAL_KEPT'];
}
$template->assign_block_vars('trace', array(
'WHO' => sprintf($user->lang['TRACE_GLOBAL_SETTING'], $userdata['username']),
'INFORMATION' => sprintf($information, '<a href="' . $this->u_action . "&amp;u=$user_id&amp;f=0&amp;auth=$permission&amp;back=$forum_id\">", '</a>'),
- 'S_SETTING_UNSET' => false,
+ 'S_SETTING_NO' => false,
'S_SETTING_YES' => $auth_setting,
- 'S_SETTING_NO' => !$auth_setting,
- 'S_TOTAL_UNSET' => false,
+ 'S_SETTING_NEVER' => !$auth_setting,
+ 'S_TOTAL_NO' => false,
'S_TOTAL_YES' => ($total == ACL_YES) ? true : false,
- 'S_TOTAL_NO' => ($total == ACL_NO) ? true : false)
+ 'S_TOTAL_NEVER' => ($total == ACL_NEVER) ? true : false)
);
}
@@ -1108,12 +1108,12 @@ class acp_permissions
'WHO' => $userdata['username'],
'INFORMATION' => $user->lang['TRACE_USER_FOUNDER'],
- 'S_SETTING_UNSET' => ($auth_setting == ACL_UNSET) ? true : false,
- 'S_SETTING_YES' => ($auth_setting == ACL_YES) ? true : false,
'S_SETTING_NO' => ($auth_setting == ACL_NO) ? true : false,
- 'S_TOTAL_UNSET' => false,
+ 'S_SETTING_YES' => ($auth_setting == ACL_YES) ? true : false,
+ 'S_SETTING_NEVER' => ($auth_setting == ACL_NEVER) ? true : false,
+ 'S_TOTAL_NO' => false,
'S_TOTAL_YES' => true,
- 'S_TOTAL_NO' => false)
+ 'S_TOTAL_NEVER' => false)
);
}
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 6875d19178..dc3a32663e 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1841,7 +1841,7 @@ class acp_users
while ($row = $db->sql_fetchrow($result))
{
- $hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'global', ACL_NO);
+ $hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'global', ACL_NEVER);
$auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', false, false);
}
$db->sql_freeresult($result);
@@ -1855,7 +1855,7 @@ class acp_users
while ($row = $db->sql_fetchrow($result))
{
- $hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'local', ACL_NO);
+ $hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'local', ACL_NEVER);
$auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', true, false);
}
$db->sql_freeresult($result);
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index db02e5dd97..a6ff1ddc2b 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -81,9 +81,9 @@ class auth_admin extends auth
* @param mixed $forum_id forum_ids to search for. Defining a forum id also means getting local settings
* @param string $auth_option the auth_option defines the permission setting to look for (a_ for example)
* @param local|global $scope the scope defines the permission scope. If local, a forum_id is additionally required
- * @param ACL_NO|ACL_UNSET|ACL_YES $acl_fill defines the mode those permissions not set are getting filled with
+ * @param ACL_NEVER|ACL_NO|ACL_YES $acl_fill defines the mode those permissions not set are getting filled with
*/
- function get_mask($mode, $user_id = false, $group_id = false, $forum_id = false, $auth_option = false, $scope = false, $acl_fill = ACL_NO)
+ function get_mask($mode, $user_id = false, $group_id = false, $forum_id = false, $auth_option = false, $scope = false, $acl_fill = ACL_NEVER)
{
global $db, $user;
@@ -828,7 +828,7 @@ class auth_admin extends auth
// Ok, include the any-flag if one or more auth options are set to yes...
foreach ($auth as $auth_option => $setting)
{
- if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NO))
+ if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NEVER))
{
$auth[$flag] = ACL_YES;
}
@@ -858,7 +858,7 @@ class auth_admin extends auth
{
$auth_option_id = (int) $this->option_ids[$auth_option];
- if ($setting != ACL_UNSET)
+ if ($setting != ACL_NO)
{
foreach ($ug_id as $id)
{
@@ -920,7 +920,7 @@ class auth_admin extends auth
// Re-set any flag...
foreach ($auth as $auth_option => $setting)
{
- if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NO))
+ if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NEVER))
{
$auth[$flag] = ACL_YES;
}
@@ -931,7 +931,7 @@ class auth_admin extends auth
{
$auth_option_id = (int) $this->option_ids[$auth_option];
- if ($setting != ACL_UNSET)
+ if ($setting != ACL_NO)
{
$sql_ary[] = array(
'role_id' => (int) $role_id,
@@ -941,13 +941,13 @@ class auth_admin extends auth
}
}
- // If no data is there, we set the any-flag to ACL_NO...
+ // If no data is there, we set the any-flag to ACL_NEVER...
if (!sizeof($sql_ary))
{
$sql_ary[] = array(
'role_id' => (int) $role_id,
'auth_option_id' => $this->option_ids[$flag],
- 'auth_setting' => ACL_NO
+ 'auth_setting' => ACL_NEVER
);
}
@@ -1016,7 +1016,7 @@ class auth_admin extends auth
while ($row = $db->sql_fetchrow($result))
{
$option_id_ary[] = $row['auth_option_id'];
- $auth_id_ary[$row['auth_option']] = ACL_UNSET;
+ $auth_id_ary[$row['auth_option']] = ACL_NO;
}
$db->sql_freeresult($result);
@@ -1093,9 +1093,9 @@ class auth_admin extends auth
foreach ($category_array as $cat => $cat_array)
{
$template->assign_block_vars($tpl_cat, array(
- 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NO'] && !$cat_array['S_UNSET']) ? true : false,
- '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,
+ 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
+ 'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
+ 'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false,
'CAT_NAME' => $user->lang['permission_cat'][$cat])
);
@@ -1104,8 +1104,8 @@ class auth_admin extends auth
{
$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
'S_YES' => ($allowed == ACL_YES) ? true : false,
+ 'S_NEVER' => ($allowed == ACL_NEVER) ? true : false,
'S_NO' => ($allowed == ACL_NO) ? true : false,
- 'S_UNSET' => ($allowed == ACL_UNSET) ? true : false,
'UG_ID' => $ug_id,
'FORUM_ID' => $forum_id,
@@ -1166,15 +1166,15 @@ class auth_admin extends auth
{
$content_array[$forum_id][$cat] = array(
'S_YES' => false,
+ 'S_NEVER' => false,
'S_NO' => false,
- 'S_UNSET' => false,
'permissions' => array(),
);
}
$content_array[$forum_id][$cat]['S_YES'] |= ($auth_setting == ACL_YES) ? true : false;
+ $content_array[$forum_id][$cat]['S_NEVER'] |= ($auth_setting == ACL_NEVER) ? true : false;
$content_array[$forum_id][$cat]['S_NO'] |= ($auth_setting == ACL_NO) ? true : false;
- $content_array[$forum_id][$cat]['S_UNSET'] |= ($auth_setting == ACL_UNSET) ? true : false;
$content_array[$forum_id][$cat]['permissions'][$permission] = $auth_setting;
}
@@ -1211,7 +1211,7 @@ class auth_admin extends auth
{
if (strpos($opt, 'a_') === 0)
{
- $hold_ary[0][$opt] = ACL_NO;
+ $hold_ary[0][$opt] = ACL_NEVER;
}
}
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
index 884f58ef0a..b226f0b13b 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/includes/auth.php
@@ -378,14 +378,14 @@ class auth
// If one option is allowed, the global permission for this option has to be allowed too
// example: if the user has the a_ permission this means he has one or more a_* permissions
- if ($auth_ary[$opt] == ACL_YES && (!isset($bitstring[$this->acl_options[$ary_key][$option_key]]) || $bitstring[$this->acl_options[$ary_key][$option_key]] == ACL_NO))
+ if ($auth_ary[$opt] == ACL_YES && (!isset($bitstring[$this->acl_options[$ary_key][$option_key]]) || $bitstring[$this->acl_options[$ary_key][$option_key]] == ACL_NEVER))
{
$bitstring[$this->acl_options[$ary_key][$option_key]] = ACL_YES;
}
}
else
{
- $bitstring[$id] = ACL_NO;
+ $bitstring[$id] = ACL_NEVER;
}
}
@@ -489,7 +489,7 @@ class auth
$hold_ary = array();
// First grab user settings ... each user has only one setting for each
- // option ... so we shouldn't need any ACL_NO checks ... he says ...
+ // option ... so we shouldn't need any ACL_NEVER checks ... he says ...
// Grab assigned roles...
$sql = $db->sql_build_query('SELECT', array(
'SELECT' => 'ao.auth_option, a.auth_role_id, r.auth_setting as role_auth_setting, a.user_id, a.forum_id, a.auth_setting',
@@ -522,7 +522,7 @@ class auth
}
$db->sql_freeresult($result);
- // Now grab group settings ... ACL_NO overrides ACL_YES so act appropriatley
+ // Now grab group settings ... ACL_NEVER overrides ACL_YES so act appropriatley
$sql = $db->sql_build_query('SELECT', array(
'SELECT' => 'ug.user_id, ao.auth_option, a.forum_id, a.auth_setting, a.auth_role_id, r.auth_setting as role_auth_setting',
@@ -552,13 +552,13 @@ class auth
while ($row = $db->sql_fetchrow($result))
{
- if (!isset($hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']]) || (isset($hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']]) && $hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] != ACL_NO))
+ if (!isset($hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']]) || (isset($hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']]) && $hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] != ACL_NEVER))
{
$setting = ($row['auth_role_id']) ? $row['role_auth_setting'] : $row['auth_setting'];
$hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] = $setting;
- // Check for existence of ACL_YES if an option got set to NO
- if ($setting == ACL_NO)
+ // Check for existence of ACL_YES if an option got set to ACL_NEVER
+ if ($setting == ACL_NEVER)
{
$flag = substr($row['auth_option'], 0, strpos($row['auth_option'], '_') + 1);
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 5bf505243b..c3dfcbeca7 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -31,9 +31,9 @@ define('USER_FOUNDER', 3);
//define('USER_GUEST', 4);
// ACL
-define('ACL_NO', 0);
+define('ACL_NEVER', 0);
define('ACL_YES', 1);
-define('ACL_UNSET', -1);
+define('ACL_NO', -1);
// Login error codes
define('LOGIN_CONTINUE', 1);
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index b1aae21a00..6b480873c3 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -1884,7 +1884,7 @@ function cache_moderators()
// Clear table
$db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . MODERATOR_CACHE_TABLE);
- // We add moderators who have forum moderator permissions without an explicit ACL_NO setting
+ // We add moderators who have forum moderator permissions without an explicit ACL_NEVER setting
$hold_ary = $ug_id_ary = $sql_ary = array();
// Grab all users having moderative options...
@@ -1914,8 +1914,8 @@ function cache_moderators()
),
'WHERE' => '(o.auth_option_id = a.auth_option_id OR o.auth_option_id = r.auth_option_id)
- AND ((a.auth_setting = ' . ACL_NO . ' AND r.auth_setting IS NULL)
- OR r.auth_setting = ' . ACL_NO . ')
+ AND ((a.auth_setting = ' . ACL_NEVER . ' AND r.auth_setting IS NULL)
+ OR r.auth_setting = ' . ACL_NEVER . ')
AND a.group_id = ug.group_id
AND ug.user_id IN (' . implode(', ', $ug_id_ary) . ")
AND ug.user_pending = 0