diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-04-21 23:15:51 -0400 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-04-21 23:15:51 -0400 |
commit | f49656986cc1898e85d6d7e4cd859ec8e980dc4a (patch) | |
tree | 6386ebf3247192cb477510d25fa2a1cf2da6c20d /phpBB | |
parent | b1367bce488d0acea00a5ebf8725d0cde5515655 (diff) | |
download | forums-f49656986cc1898e85d6d7e4cd859ec8e980dc4a.tar forums-f49656986cc1898e85d6d7e4cd859ec8e980dc4a.tar.gz forums-f49656986cc1898e85d6d7e4cd859ec8e980dc4a.tar.bz2 forums-f49656986cc1898e85d6d7e4cd859ec8e980dc4a.tar.xz forums-f49656986cc1898e85d6d7e4cd859ec8e980dc4a.zip |
[ticket/10141] Save a hash lookup when value is not in cache.
PHPBB3-10141
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/auth.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index 4b13c6be7f..8324cb4977 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -126,13 +126,17 @@ class auth while ($subseq = substr($seq, $i, 6)) { - if (!isset($seq_cache[$subseq])) + if (isset($seq_cache[$subseq])) { - $seq_cache[$subseq] = str_pad(base_convert($subseq, 36, 2), 31, 0, STR_PAD_LEFT); + $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] .= $seq_cache[$subseq]; + $this->acl[$f] .= $converted; $i += 6; } } |