1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

- blabla, additional bugfixing permissions...

git-svn-id: file:///svn/phpbb/trunk@5580 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-02-24 17:33:42 +00:00
parent 37e0e0a4da
commit 724b37ae97
8 changed files with 111 additions and 65 deletions

View File

@@ -47,6 +47,20 @@ class auth_admin extends auth
$cache->put('acl_options', $this->acl_options);
}
if (!sizeof($this->option_ids))
{
$sql = 'SELECT auth_option_id, auth_option
FROM ' . ACL_OPTIONS_TABLE;
$result = $db->sql_query($sql);
$this->option_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$this->option_ids[$row['auth_option']] = $row['auth_option_id'];
}
$db->sql_freeresult($result);
}
}
/**
@@ -662,20 +676,6 @@ class auth_admin extends auth
$ug_id = array($ug_id);
}
if (!sizeof($this->option_ids))
{
$sql = 'SELECT auth_option_id, auth_option
FROM ' . ACL_OPTIONS_TABLE;
$result = $db->sql_query($sql);
$this->option_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$this->option_ids[$row['auth_option']] = $row['auth_option_id'];
}
$db->sql_freeresult($result);
}
$ug_id_sql = 'IN (' . implode(', ', array_map('intval', $ug_id)) . ')';
$forum_sql = 'IN (' . implode(', ', array_map('intval', $forum_id)) . ') ';
@@ -781,20 +781,6 @@ class auth_admin extends auth
{
global $db;
if (!sizeof($this->option_ids))
{
$sql = 'SELECT auth_option_id, auth_option
FROM ' . ACL_OPTIONS_TABLE;
$result = $db->sql_query($sql);
$this->option_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$this->option_ids[$row['auth_option']] = $row['auth_option_id'];
}
$db->sql_freeresult($result);
}
// Remove current auth options...
$sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
WHERE role_id = ' . $role_id;