Kode: Velg alt
/**
* Look up an option
* if the option is prefixed with !, then the result becomes negated
*
* If a forum id is specified the local option will be combined with a global option if one exist.
* If a forum id is not specified, only the global option will be checked.
*/
function acl_get($opt, $f = 0)
{
$negate = false;
if (strpos($opt, '!') === 0)
{
$negate = true;
$opt = substr($opt, 1);
}
if (!isset($this->cache[$f][$opt]))
{
// We combine the global/local option with an OR because some options are global and local.
// If the user has the global permission the local one is true too and vice versa
$this->cache[$f][$opt] = false;
// Is this option a global permission setting?
if (isset($this->acl_options['global'][$opt]))
{
if (isset($this->acl[0]))
{
$this->cache[$f][$opt] = $this->acl[0][$this->acl_options['global'][$opt]];
}
}
// Is this option a local permission setting?
// But if we check for a global option only, we won't combine the options...
if ($f != 0 && isset($this->acl_options['local'][$opt]))
{
if (isset($this->acl[$f]) && isset($this->acl[$f][$this->acl_options['local'][$opt]]))
{
$this->cache[$f][$opt] |= $this->acl[$f][$this->acl_options['local'][$opt]];
}
}
}
// Founder always has all global options set to true...
return ($negate) ? !$this->cache[$f][$opt] : $this->cache[$f][$opt];
}
Og jeg får også en annen feil når jeg da skal behandle brukere
[phpBB Debug] PHP Notice: in file /includes/acp/acp_users.php on line 144: Undefined index: ACP_USER_
og kan ikke finne linjen i /language/acp