aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions.php3
-rw-r--r--phpBB/install/schemas/schema_data.sql1
2 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index cd3a4fb270..21abbad392 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -164,9 +164,10 @@ function unique_id($extra = 'c')
$val = md5($val);
$config['rand_seed'] = md5($config['rand_seed'] . $val . $extra);
- if ($dss_seeded !== true)
+ if ($dss_seeded !== true && ($config['rand_seed_last_update'] < time() - rand(1,10)))
{
set_config('rand_seed', $config['rand_seed'], true);
+ set_config('rand_seed_last_update', time(), true);
$dss_seeded = true;
}
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 3feb804b67..e7785f5d62 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -224,6 +224,7 @@ INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_po
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_topics', '1', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_users', '1', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed_last_update', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_date', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_users', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('search_last_gc', '0', 1);