aboutsummaryrefslogtreecommitdiff
path: root/actions/systemsettings
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-02 12:40:38 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-02 12:40:38 +0000
commit4cf87cd1f558593fe7047440806bc6b7d32e83ee (patch)
treeeff1ceef115a0977cfc8988f6ca88ae3afd455e7 /actions/systemsettings
parentdb727a00f06d95da0b6d3a3356b1d60c01feabe3 (diff)
downloadelgg-4cf87cd1f558593fe7047440806bc6b7d32e83ee.tar.gz
elgg-4cf87cd1f558593fe7047440806bc6b7d32e83ee.tar.bz2
The system now uses the site GUID to get and set entity data. Also, installation is a great deal more visual.
git-svn-id: https://code.elgg.org/elgg/trunk@621 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/systemsettings')
-rw-r--r--actions/systemsettings/install.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/actions/systemsettings/install.php b/actions/systemsettings/install.php
new file mode 100644
index 000000000..d1ed6b6a2
--- /dev/null
+++ b/actions/systemsettings/install.php
@@ -0,0 +1,38 @@
+<?php
+
+ /**
+ * Elgg install site action
+ *
+ * Creates a nwe site and sets it as the default
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ if (get_input('settings') == 'go') {
+
+ if (!datalist_get('default_site')) {
+
+ $site = new ElggSite();
+ $site->name = get_input('sitename');
+ $site->url = get_input('wwwroot');
+ $site->save();
+
+ datalist_set('path',get_input('path'));
+ datalist_set('dataroot',get_input('dataroot'));
+
+ datalist_set('default_site',$site->getGUID());
+
+ system_message(elgg_echo("installation:configuration:success"));
+
+ forward("register.php");
+
+ }
+
+ }
+
+?> \ No newline at end of file