mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-07 16:15:22 +02:00
Removed uniqid() from make_bbcode_uid(). uniqid() was doing absolutely nothing for 20ms on each call ;(
git-svn-id: file:///svn/phpbb/trunk@1457 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6f59a4054e
commit
ff0c26e892
@ -219,10 +219,13 @@ function bbencode_second_pass($text, $uid)
|
|||||||
|
|
||||||
} // bbencode_second_pass()
|
} // bbencode_second_pass()
|
||||||
|
|
||||||
|
// Need to initialize the random numbers only ONCE
|
||||||
|
mt_srand( (double) microtime() * 1000000);
|
||||||
|
|
||||||
function make_bbcode_uid()
|
function make_bbcode_uid()
|
||||||
{
|
{
|
||||||
// Unique ID for this message..
|
// Unique ID for this message..
|
||||||
$uid = md5(uniqid(rand()));
|
$uid = md5(mt_rand());
|
||||||
$uid = substr($uid, 0, BBCODE_UID_LEN);
|
$uid = substr($uid, 0, BBCODE_UID_LEN);
|
||||||
|
|
||||||
return $uid;
|
return $uid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user