1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

- Optimize acl_getf_global a bit

- a little performance improvement of the IP regular expressions
- convert post_text/subject collation to utf8_unicode_ci if a user wants to use mysql_fulltext to allow case insensitivity [Bug #6272]
- mysql_fulltext should alter all necessary columns at once to speed up the process
- validate URLs against RFC3986
- fixed some weirdness in make_clickable
I hope I didn't break any URLs with this commit, if I did then report it to the bugtracker please!


git-svn-id: file:///svn/phpbb/trunk@6774 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann
2006-12-16 20:24:34 +00:00
parent 6938688e75
commit 1e34820cd8
7 changed files with 149 additions and 75 deletions

View File

@@ -221,16 +221,18 @@ class auth
*/
function acl_getf_global($opt)
{
$allowed = false;
if (is_array($opt))
{
// evaluates to true as soon as acl_getf_global is true for one option
foreach ($opt as $check_option)
{
$allowed |= $this->acl_getf_global($check_option);
if ($this->acl_getf_global($check_option))
{
return true;
}
}
return $allowed;
return false;
}
if (isset($this->acl_options['local'][$opt]))
@@ -243,20 +245,19 @@ class auth
continue;
}
$allowed = (!isset($this->cache[$f][$opt])) ? $this->acl_get($opt, $f) : $this->cache[$f][$opt];
if ($allowed)
// as soon as the user has any permission we're done so return true
if ((!isset($this->cache[$f][$opt])) ? $this->acl_get($opt, $f) : $this->cache[$f][$opt])
{
break;
return true;
}
}
}
else if (isset($this->acl_options['global'][$opt]))
{
$allowed = $this->acl_get($opt);
return $this->acl_get($opt);
}
return $allowed;
return false;
}
/**