diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-08 03:21:19 -0400 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-08 03:21:19 -0400 |
commit | ab44fe5e394fe7b69c57266e2934200a3ee9bbc5 (patch) | |
tree | e6021c19fa15800787b1a7459fb8ad40cf2d8391 /phpBB/includes/auth.php | |
parent | 9c6660a2253149baff0094b943823de6758b35a6 (diff) | |
parent | c0336988155736583c6fc4398980bd2a4e4036b6 (diff) | |
download | forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.tar forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.tar.gz forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.tar.bz2 forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.tar.xz forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.zip |
Merge branch 'develop' into feature/prune-users
* develop: (170 commits)
[ticket/10145] Always recompile all templates when DEBUG_EXTRA is defined.
[feature/attachment-management-no-reassignment] Handle privacy and some more.
[ticket/10148] Turn TEMPLATE_BITFIELD into an instance variable.
[ticket/10147] Corrected a typo in includes/functions_template.php.
[ticket/10141] Save a hash lookup when value is not in cache.
[ticket/10143] Added tests for storing a previously deleted value in db cache.
[ticket/10105] Update AIM express link.
[ticket/10105] Update AIM application download link.
[ticket/10137] Remove unintended space at end of PHP_URL_FOPEN_SUPPORT_EXPLAIN.
[ticket/10141] Split double-assignment into conditional and unconditional part.
[ticket/10141] Use a cache in $auth->_fill_acl() for better performance.
[ticket/9961] Create log entries when users are activated.
[ticket/10139] Make signatures of set_atomic() consistent by using $new_value.
[ticket/10139] Rename $cache to $use_cache to avoid confusion with cache object
[ticket/10006] Remove unneeded if statements
[ticket/10006] Remove return values
[ticket/10006] More testing
[ticket/10006] Tweak the tests a bit
[ticket/10006] Add phpbb_config::delete
[ticket/7941] Added @return to generate_board_url docstring.
...
Diffstat (limited to 'phpBB/includes/auth.php')
-rw-r--r-- | phpBB/includes/auth.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index 5b197e93f3..22aca5faf9 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -109,6 +109,7 @@ class auth */ function _fill_acl($user_permissions) { + $seq_cache = array(); $this->acl = array(); $user_permissions = explode("\n", $user_permissions); @@ -125,8 +126,17 @@ class auth while ($subseq = substr($seq, $i, 6)) { + if (isset($seq_cache[$subseq])) + { + $converted = $seq_cache[$subseq]; + } + else + { + $converted = $seq_cache[$subseq] = str_pad(base_convert($subseq, 36, 2), 31, 0, STR_PAD_LEFT); + } + // We put the original bitstring into the acl array - $this->acl[$f] .= str_pad(base_convert($subseq, 36, 2), 31, 0, STR_PAD_LEFT); + $this->acl[$f] .= $converted; $i += 6; } } |