aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_main.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-01-04 07:51:04 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-01-04 07:51:04 +0000
commitd23a07dc7dc4248180d451bce584a47f7defd737 (patch)
treeb7c3197adfe26378bb4c62a318755c63793f236c /phpBB/includes/acp/acp_main.php
parent17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd (diff)
downloadforums-d23a07dc7dc4248180d451bce584a47f7defd737.tar
forums-d23a07dc7dc4248180d451bce584a47f7defd737.tar.gz
forums-d23a07dc7dc4248180d451bce584a47f7defd737.tar.bz2
forums-d23a07dc7dc4248180d451bce584a47f7defd737.tar.xz
forums-d23a07dc7dc4248180d451bce584a47f7defd737.zip
- sperate permissions from sessions
- added some comments to the auth class for better understanding - revised some permission functions - added option to negate permission check by prefixing option with a ! (for example checking for !f_read returns true if user is not able to read forum) - used the new option for testing in ucp front git-svn-id: file:///svn/phpbb/trunk@5423 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_main.php')
-rw-r--r--phpBB/includes/acp/acp_main.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 9c31528955..924ae6713b 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -205,16 +205,17 @@ class acp_main
}
$post_count_ary = $auth->acl_getf('f_postcount');
-
+ $forum_read_ary = $auth->acl_getf('f_read');
+
$forum_ary = array();
foreach ($post_count_ary as $forum_id => $allowed)
{
- if ($allowed['f_postcount'])
+ if ($allowed['f_postcount'] && $forum_read_ary[$forum_id]['f_read'])
{
$forum_ary[] = $forum_id;
}
}
-
+
if (!sizeof($forum_ary))
{
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0');