mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Optimized this so it would not renumber the keys in the array every time it would grab a unicode character. Instead, it uses the php internal functions to get at the array as we see fit.
git-svn-id: file:///svn/phpbb/trunk@9108 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
ae9c4068e7
commit
0955e2e539
1 changed files with 3 additions and 2 deletions
|
@ -1434,9 +1434,10 @@ function mail_encode($str)
|
||||||
{
|
{
|
||||||
$text = '';
|
$text = '';
|
||||||
|
|
||||||
while (sizeof($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length)
|
while (sizeof($array) && intval((strlen($text . current($array)) + 2) / 3) << 2 <= $split_length)
|
||||||
{
|
{
|
||||||
$text .= array_shift($array);
|
$text .= current($array);
|
||||||
|
unset($array[key($array)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$str .= $start . base64_encode($text) . $end . ' ';
|
$str .= $start . base64_encode($text) . $end . ' ';
|
||||||
|
|
Loading…
Add table
Reference in a new issue