From ff0c26e892e3d0d809a9439dad2608c3ae6557cf Mon Sep 17 00:00:00 2001 From: Bart van Bragt Date: Mon, 26 Nov 2001 21:40:22 +0000 Subject: [PATCH] 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 --- phpBB/includes/bbcode.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index e6d973c7f3..fb5c86333d 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -219,10 +219,13 @@ function bbencode_second_pass($text, $uid) } // 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(uniqid(rand())); + $uid = md5(mt_rand()); $uid = substr($uid, 0, BBCODE_UID_LEN); return $uid; @@ -694,4 +697,4 @@ function bbcode_array_pop(&$stack) return($return_val); } -?> \ No newline at end of file +?>