Skip to content

Instantly share code, notes, and snippets.

@nickvergessen
Created July 6, 2011 19:32
Show Gist options
  • Save nickvergessen/1068129 to your computer and use it in GitHub Desktop.
Save nickvergessen/1068129 to your computer and use it in GitHub Desktop.
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 10d7973..7816484 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -868,10 +868,18 @@ class auth_admin extends auth
$db->sql_query($sql);
}
- // Ok, include the any-flag if one or more auth options are set to yes...
+ // Ok, set the any flag to Never.
+ // So when there are only Never permissions, it is Never.
+ // If there is at least one Yes permission Yes and No otherwise.
+ $auth[$flag] = ACL_NEVER;
+
foreach ($auth as $auth_option => $setting)
{
- if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NEVER))
+ if ($setting == ACL_NO && ($auth[$flag] == ACL_NEVER))
+ {
+ $auth[$flag] = ACL_NO;
+ }
+ if ($setting == ACL_YES)
{
$auth[$flag] = ACL_YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment