aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php5
1 files changed, 3 insertions, 2 deletions
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);
}