summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install15
1 files changed, 13 insertions, 2 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index c1854b20f..fc78a4db2 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -408,9 +408,9 @@ function system_install() {
db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'node_options_forum', 'a:1:{i:0;s:6:"status";}');
- $cron_key = md5(time());
+ $cron_key = serialize(md5(mt_rand()));
- db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'cron_key', serialize($cron_key));
+ db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'cron_key', $cron_key);
}
/**
@@ -2659,6 +2659,17 @@ function system_update_7000() {
}
/**
+ * Generate a cron key and save it in the variables table
+ */
+function system_update_7001() {
+ $ret = array();
+ variable_set('cron_key', md5(mt_rand()));
+ $ret[] = array('success' => TRUE, 'query' => "variable_set('cron_key')");
+ return $ret;
+}
+
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/