diff options
-rw-r--r-- | engine/lib/configuration.php | 40 | ||||
-rw-r--r-- | engine/lib/elgglib.php | 13 | ||||
-rw-r--r-- | engine/lib/sites.php | 26 |
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
|