From 24efdfcd883eebf36d7f31f1e194bcf4ba444980 Mon Sep 17 00:00:00 2001 From: Graham Eames Date: Thu, 3 Nov 2005 20:53:47 +0000 Subject: I'm merging a few changes that we made to the session code in 2.0 into this code stream as well. This should work, but equally it might break the autologin :-) git-svn-id: file:///svn/phpbb/trunk@5288 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 477a7f7ac3..75174dadee 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -138,11 +138,12 @@ function gen_rand_string($num_chars) /** * Return unique id +* @param $extra additional entropy for call to mt_srand */ -function unique_id() +function unique_id($extra = 0) { list($sec, $usec) = explode(' ', microtime()); - mt_srand((float) $sec + ((float) $usec * 100000)); + mt_srand((float) $extra + (float) $sec + ((float) $usec * 100000)); return uniqid(mt_rand(), true); } -- cgit v1.2.1