diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-05-01 16:30:51 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-05-01 16:30:51 +0000 |
commit | 1ba0fab3389b57e0167c9df94ed19602cc4103af (patch) | |
tree | f430f0a1d6ed9a76bf7f28034fb5b292c06b9a8f /engine/lib/install.php | |
parent | 2cc7809fbc2e3fef24f213e2ef1e40fa54f1d05e (diff) | |
download | elgg-1ba0fab3389b57e0167c9df94ed19602cc4103af.tar.gz elgg-1ba0fab3389b57e0167c9df94ed19602cc4103af.tar.bz2 |
Major site config changes
git-svn-id: https://code.elgg.org/elgg/trunk@615 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/install.php')
-rw-r--r-- | engine/lib/install.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/engine/lib/install.php b/engine/lib/install.php index 79b170842..a5e1b6f4d 100644 --- a/engine/lib/install.php +++ b/engine/lib/install.php @@ -42,4 +42,36 @@ }
+ /**
+ * Function that gets run once, when the system is first installed
+ *
+ */
+ function install_prerequisites() {
+
+ // Load existing config
+ global $CONFIG;
+
+ // Create a new Elgg site
+ $site = new ElggSite();
+ $site->save();
+
+ // Set datalist alerting us to the fact that the default site is this one
+ datalist_set('default_site',$site->getGUID());
+
+ }
+
+ /**
+ * Functions to be run at install init-time.
+ *
+ */
+ function install_init() {
+
+ // Run the install_prerequisites function just once
+ run_function_once("install_prerequisites");
+
+ }
+
+ // Make sure install_boot gets called on system book
+ register_event_handler('init','system','install_init',1);
+
?>
\ No newline at end of file |