phpBB

Code Changes

File: phpbb/auth/auth.php

  Unmodified   Added   Modified   Removed
Line 72Line 72

// Verify bitstring length with options provided...
$renew = false;


// Verify bitstring length with options provided...
$renew = false;

		$global_length = sizeof($this->acl_options['global']);
$local_length = sizeof($this->acl_options['local']);

		$global_length = count($this->acl_options['global']);
$local_length = count($this->acl_options['local']);


// Specify comparing length (bitstring is padded to 31 bits)
$global_length = ($global_length % 31) ? ($global_length - ($global_length % 31) + 31) : $global_length;


// Specify comparing length (bitstring is padded to 31 bits)
$global_length = ($global_length % 31) ? ($global_length - ($global_length % 31) + 31) : $global_length;

Line 236Line 236
				$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE;


				$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE;


				if (sizeof($this->acl))

				if (count($this->acl))

				{
$sql .= ' WHERE ' . $db->sql_in_set('forum_id', array_keys($this->acl), true);
}

				{
$sql .= ' WHERE ' . $db->sql_in_set('forum_id', array_keys($this->acl), true);
}

Line 278Line 278
		}

// If we get forum_ids not having this permission, we need to fill the remaining parts

		}

// If we get forum_ids not having this permission, we need to fill the remaining parts

		if ($negate && sizeof($this->acl_forum_ids))

		if ($negate && count($this->acl_forum_ids))

		{
foreach ($this->acl_forum_ids as $f)
{

		{
foreach ($this->acl_forum_ids as $f)
{

Line 455Line 455
	{
$hold_str = '';


	{
$hold_str = '';


		if (sizeof($hold_ary))

		if (count($hold_ary))

		{
ksort($hold_ary);


		{
ksort($hold_ary);


Line 514Line 514
	*/
function acl_clear_prefetch($user_id = false)
{

	*/
function acl_clear_prefetch($user_id = false)
{

		global $db, $cache;

		global $db, $cache, $phpbb_dispatcher;


// Rebuild options cache
$cache->destroy('_role_cache');


// Rebuild options cache
$cache->destroy('_role_cache');

Line 552Line 552
				user_perm_from = 0
$where_sql";
$db->sql_query($sql);

				user_perm_from = 0
$where_sql";
$db->sql_query($sql);

 

/**
* Event is triggered after user(s) permission settings cache has been cleared
*
* @event core.acl_clear_prefetch_after
* @var mixed user_id User ID(s)
* @since 3.1.11-RC1
*/
$vars = array('user_id');
extract($phpbb_dispatcher->trigger_event('core.acl_clear_prefetch_after', compact($vars)));


return;
}


return;
}