summaryrefslogtreecommitdiff
path: root/installer/installer.php
diff options
context:
space:
mode:
Diffstat (limited to 'installer/installer.php')
-rw-r--r--installer/installer.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/installer/installer.php b/installer/installer.php
index 62523308..32511541 100644
--- a/installer/installer.php
+++ b/installer/installer.php
@@ -94,4 +94,12 @@ class installer {
return array("admin", $password);
}
+
+ static function create_private_key() {
+ $key = md5(uniqid(mt_rand(), true)) . md5(uniqid(mt_rand(), true));
+ if (mysql_query("INSERT INTO `vars` VALUES(NULL, 'core', 'private_key', '$key')")) {
+ } else {
+ throw new Exception(mysql_error());
+ }
+ }
} \ No newline at end of file