mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user