1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

- 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
This commit is contained in:
Meik Sievertsen
2006-01-04 07:51:04 +00:00
parent 17dc26e19b
commit d23a07dc7d
7 changed files with 496 additions and 383 deletions

View File

@@ -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');

View File

@@ -1778,7 +1778,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
return false;
}
/*
if ($action != 'install')
{
@mkdir("{$phpbb_root_path}styles/$path", 0777);
@@ -1789,7 +1789,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
$this->copy_files("$root_path$type", filelist("$root_path$type", '', '*'), "$path/$type");
}
}
*/
$sql_ary = array(
$mode . '_name' => $name,
$mode . '_copyright' => $copyright,
@@ -1809,7 +1809,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
case 'theme':
$sql_ary += array(
'theme_storedb' => (!is_writeable("{$phpbb_root_path}styles/$path/theme/stylesheet.css")) ? 1 : $store_db,
'theme_data' => ($store_db) ? (($root_path) ? str_replace('./', "styles/$path/theme/", implode('', file("$root_path/$type/stylesheet.css"))) : '') : '',
'theme_data' => ($store_db) ? (($root_path) ? str_replace('./', "styles/$path/theme/", implode('', file("$root_path/$mode/stylesheet.css"))) : '') : '',
'theme_mtime' => ($store_db) ? filemtime("{$phpbb_root_path}styles/$path/theme/stylesheet.css") : 0
);
break;