|
From: Bart v. B. <ba...@us...> - 2001-11-26 21:40:28
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv9252
Modified Files:
bbcode.php
Log Message:
Removed uniqid() from make_bbcode_uid(). uniqid() was doing absolutely nothing for 20ms on each call ;(
Index: bbcode.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** bbcode.php 2001/11/26 08:15:53 1.16
--- bbcode.php 2001/11/26 21:40:22 1.17
***************
*** 220,227 ****
} // bbencode_second_pass()
function make_bbcode_uid()
{
// Unique ID for this message..
! $uid = md5(uniqid(rand()));
$uid = substr($uid, 0, BBCODE_UID_LEN);
--- 220,230 ----
} // bbencode_second_pass()
+ // Need to initialize the random numbers only ONCE
+ mt_srand( (double) microtime() * 1000000);
+
function make_bbcode_uid()
{
// Unique ID for this message..
! $uid = md5(mt_rand());
$uid = substr($uid, 0, BBCODE_UID_LEN);
***************
*** 695,697 ****
}
! ?>
\ No newline at end of file
--- 698,700 ----
}
! ?>
|