1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

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
This commit is contained in:
Meik Sievertsen
2006-06-22 16:49:04 +00:00
parent 725b21f2d2
commit 8b1555c15b
14 changed files with 145 additions and 144 deletions

View File

@@ -33,9 +33,9 @@ require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
define('ACL_NO', 0);
define('ACL_NEVER', 0);
define('ACL_YES', 1);
define('ACL_UNSET', -1);
define('ACL_NO', -1);
define('ACL_GROUPS_TABLE', $table_prefix.'acl_groups');
define('ACL_OPTIONS_TABLE', $table_prefix.'acl_options');
@@ -212,14 +212,14 @@ foreach ($prefixes as $prefix)
echo "<p><b>Adding $auth_option...</b></p>\n";
mass_auth('group', 0, 'guests', $auth_option, ACL_NO);
mass_auth('group', 0, 'inactive', $auth_option, ACL_NO);
mass_auth('group', 0, 'inactive_coppa', $auth_option, ACL_NO);
mass_auth('group', 0, 'registered_coppa', $auth_option, ACL_NO);
mass_auth('group', 0, 'registered', $auth_option, (($prefix != 'm_' && $prefix != 'a_') ? ACL_YES : ACL_NO));
mass_auth('group', 0, 'global_moderators', $auth_option, (($prefix != 'a_') ? ACL_YES : ACL_NO));
mass_auth('group', 0, 'guests', $auth_option, ACL_NEVER);
mass_auth('group', 0, 'inactive', $auth_option, ACL_NEVER);
mass_auth('group', 0, 'inactive_coppa', $auth_option, ACL_NEVER);
mass_auth('group', 0, 'registered_coppa', $auth_option, ACL_NEVER);
mass_auth('group', 0, 'registered', $auth_option, (($prefix != 'm_' && $prefix != 'a_') ? ACL_YES : ACL_NEVER));
mass_auth('group', 0, 'global_moderators', $auth_option, (($prefix != 'a_') ? ACL_YES : ACL_NEVER));
mass_auth('group', 0, 'administrators', $auth_option, ACL_YES);
mass_auth('group', 0, 'bots', $auth_option, (($prefix != 'm_' && $prefix != 'a_') ? ACL_YES : ACL_NO));
mass_auth('group', 0, 'bots', $auth_option, (($prefix != 'm_' && $prefix != 'a_') ? ACL_YES : ACL_NEVER));
}
}
}
@@ -236,7 +236,7 @@ echo "<p><b>Done</b></p>\n";
$forum_id = forum ids (array|int|0) -> 0 == all forums
$ug_id = [int] user_id|group_id : [string] usergroup name
$acl_list = [string] acl entry : [array] acl entries
$setting = ACL_YES|ACL_NO|ACL_UNSET
$setting = ACL_YES|ACL_NEVER|ACL_NO
*/
function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
{
@@ -337,7 +337,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
switch ($setting)
{
case ACL_UNSET:
case ACL_NO:
if (isset($cur_auth[$forum][$auth_option_id]))
{
$sql_ary['delete'][] = "DELETE FROM $table