aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-05 11:26:52 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-05 11:26:52 +0000
commit000335ccb23511fa28fb5000d13bcf6c9e6215a4 (patch)
tree3124aed982b7583f96d54e8401a1a47e05a07872
parent7bcb5bf8eddb3c43b92426624bc3e783c760cc48 (diff)
downloadelgg-000335ccb23511fa28fb5000d13bcf6c9e6215a4.tar.gz
elgg-000335ccb23511fa28fb5000d13bcf6c9e6215a4.tar.bz2
Fixes #655, Refs #628: Install now working with correct event chain (#628).
git-svn-id: https://code.elgg.org/elgg/trunk@2530 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/configuration.php40
-rw-r--r--engine/lib/elgglib.php13
-rw-r--r--engine/lib/sites.php26
3 files changed, 46 insertions, 33 deletions
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php
index fd242b01a..65afe12b6 100644
--- a/engine/lib/configuration.php
+++ b/engine/lib/configuration.php
@@ -169,27 +169,27 @@
global $CONFIG;
- if (!is_installed() || !is_db_installed()) return false;
-
- $path = datalist_get('path');
- if (!empty($path))
- $CONFIG->path = $path;
- $dataroot = datalist_get('dataroot');
- if (!empty($dataroot))
- $CONFIG->dataroot = $dataroot;
- if (isset($CONFIG->site) && ($CONFIG->site instanceof ElggSite)) {
- $CONFIG->wwwroot = $CONFIG->site->url;
- $CONFIG->sitename = $CONFIG->site->name;
- $CONFIG->sitedescription = $CONFIG->site->description;
- $CONFIG->siteemail = $CONFIG->site->email;
+ if (is_installed() || is_db_installed()) {
+
+ $path = datalist_get('path');
+ if (!empty($path))
+ $CONFIG->path = $path;
+ $dataroot = datalist_get('dataroot');
+ if (!empty($dataroot))
+ $CONFIG->dataroot = $dataroot;
+ if (isset($CONFIG->site) && ($CONFIG->site instanceof ElggSite)) {
+ $CONFIG->wwwroot = $CONFIG->site->url;
+ $CONFIG->sitename = $CONFIG->site->name;
+ $CONFIG->sitedescription = $CONFIG->site->description;
+ $CONFIG->siteemail = $CONFIG->site->email;
+ }
+ $CONFIG->url = $CONFIG->wwwroot;
+
+ // Load default settings from database
+ get_all_config();
+
+ return true;
}
- $CONFIG->url = $CONFIG->wwwroot;
-
- // Load default settings from database
- get_all_config();
-
- return true;
-
}
/**
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 9c4e58a81..d0a28b2ea 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1348,33 +1348,44 @@
}
} else {
-
+
$return = true;
if (!empty($CONFIG->events[$event][$object_type]) && is_array($CONFIG->events[$event][$object_type])) {
foreach($CONFIG->events[$event][$object_type] as $eventfunction) {
if ($eventfunction($event, $object_type, $object) === false) {
return false;
+ //$return = false;
+ //break;
}
}
}
+
if (!empty($CONFIG->events['all'][$object_type]) && is_array($CONFIG->events['all'][$object_type])) {
foreach($CONFIG->events['all'][$object_type] as $eventfunction) {
if ($eventfunction($event, $object_type, $object) === false) {
return false;
+ //$return = false;
+ //break;
}
}
}
+
if (!empty($CONFIG->events[$event]['all']) && is_array($CONFIG->events[$event]['all'])) {
foreach($CONFIG->events[$event]['all'] as $eventfunction) {
if ($eventfunction($event, $object_type, $object) === false) {
return false;
+ //$return = false;
+ //break;
}
}
}
+
if (!empty($CONFIG->events['all']['all']) && is_array($CONFIG->events['all']['all'])) {
foreach($CONFIG->events['all']['all'] as $eventfunction) {
if ($eventfunction($event, $object_type, $object) === false) {
return false;
+ //$return = false;
+ //break;
}
}
}
diff --git a/engine/lib/sites.php b/engine/lib/sites.php
index 4c8a57ec4..f012b3cb4 100644
--- a/engine/lib/sites.php
+++ b/engine/lib/sites.php
@@ -595,19 +595,21 @@
global $CONFIG;
- if (!is_installed() || !is_db_installed()) return false;
-
- $site = trigger_plugin_hook("siteid","system");
- if ($site === null || $site === false) {
- $CONFIG->site_id = (int) datalist_get('default_site');
- } else {
- $CONFIG->site_id = $site;
- }
- $CONFIG->site_guid = $CONFIG->site_id;
- $CONFIG->site = get_entity($CONFIG->site_guid);
-
+ if (is_installed() && is_db_installed()) {
+
+ $site = trigger_plugin_hook("siteid","system");
+ if ($site === null || $site === false) {
+ $CONFIG->site_id = (int) datalist_get('default_site');
+ } else {
+ $CONFIG->site_id = $site;
+ }
+ $CONFIG->site_guid = $CONFIG->site_id;
+ $CONFIG->site = get_entity($CONFIG->site_guid);
+
+ return true;
+ }
+
return true;
-
}
// Register event handlers