1
0
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:
Graham Eames
2005-11-03 20:53:47 +00:00
parent 759e33f759
commit 24efdfcd88
2 changed files with 8 additions and 5 deletions

View File

@@ -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);
}