aboutsummaryrefslogtreecommitdiff
path: root/install/ElggInstaller.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2012-01-30 20:29:56 -0500
committercash <cash.costello@gmail.com>2012-01-30 20:29:56 -0500
commit2a581392174a61b930f8a3fd384454233f26939b (patch)
treee7e5d8d72a469ae50a202a0bf4b65fb66b35287e /install/ElggInstaller.php
parent56057588976b1a4d430cfb211c90936bc75e0a4b (diff)
downloadelgg-2a581392174a61b930f8a3fd384454233f26939b.tar.gz
elgg-2a581392174a61b930f8a3fd384454233f26939b.tar.bz2
Fixes #4342 updated the installer based on boot reorg - no longer need caching code in installer
Diffstat (limited to 'install/ElggInstaller.php')
-rw-r--r--install/ElggInstaller.php37
1 files changed, 20 insertions, 17 deletions
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php
index b6c28fa8d..94709ac4e 100644
--- a/install/ElggInstaller.php
+++ b/install/ElggInstaller.php
@@ -535,8 +535,6 @@ class ElggInstaller {
$params['destination'] = 'index.php';
}
- elgg_invalidate_simplecache();
-
$this->render('complete', $params);
}
@@ -754,6 +752,7 @@ class ElggInstaller {
protected function finishBootstraping($step) {
$dbIndex = array_search('database', $this->getSteps());
+ $settingsIndex = array_search('settings', $this->getSteps());
$adminIndex = array_search('admin', $this->getSteps());
$completeIndex = array_search('complete', $this->getSteps());
$stepIndex = array_search($step, $this->getSteps());
@@ -790,8 +789,8 @@ class ElggInstaller {
'private_settings.php', 'relationships.php', 'river.php',
'sites.php', 'statistics.php', 'tags.php', 'user_settings.php',
'users.php', 'upgrade.php', 'web_services.php',
- 'widgets.php', 'xml.php', 'xml-rpc.php', 'deprecated-1.7.php',
- 'deprecated-1.8.php',
+ 'widgets.php', 'xml.php', 'xml-rpc.php',
+ 'deprecated-1.7.php', 'deprecated-1.8.php',
);
foreach ($lib_files as $file) {
@@ -802,9 +801,17 @@ class ElggInstaller {
}
}
- set_default_config();
+ setup_db_connections();
+ register_translations(dirname(dirname(__FILE__)) . "/languages/");
+
+ if ($stepIndex > $settingsIndex) {
+ $CONFIG->site_guid = (int) datalist_get('default_site');
+ $CONFIG->site_id = $CONFIG->site_guid;
+ $CONFIG->site = get_entity($CONFIG->site_guid);
+ $CONFIG->dataroot = datalist_get('dataroot');
+ _elgg_session_boot(NULL, NULL, NULL);
+ }
- elgg_trigger_event('boot', 'system');
elgg_trigger_event('init', 'system');
}
}
@@ -823,8 +830,10 @@ class ElggInstaller {
$CONFIG->wwwroot = $this->getBaseUrl();
$CONFIG->url = $CONFIG->wwwroot;
$CONFIG->path = dirname(dirname(__FILE__)) . '/';
- $CONFIG->lastcache = 0;
+ $CONFIG->viewpath = $CONFIG->path . 'views/';
+ $CONFIG->pluginspath = $CONFIG->path . 'mod/';
$CONFIG->context = array();
+ $CONFIG->entity_types = array('group', 'object', 'site', 'user');
}
/**
@@ -1380,11 +1389,11 @@ class ElggInstaller {
$submissionVars['wwwroot'] = sanitise_filepath($submissionVars['wwwroot']);
$site = new ElggSite();
- $site->name = $submissionVars['sitename'];
- $site->url = $submissionVars['wwwroot'];
+ $site->name = $submissionVars['sitename'];
+ $site->url = $submissionVars['wwwroot'];
$site->access_id = ACCESS_PUBLIC;
- $site->email = $submissionVars['siteemail'];
- $guid = $site->save();
+ $site->email = $submissionVars['siteemail'];
+ $guid = $site->save();
if (!$guid) {
register_error(elgg_echo('install:error:createsite'));
@@ -1416,12 +1425,6 @@ class ElggInstaller {
$this->enablePlugins();
- // reset the views path in case of installing over an old data dir.
- $dataroot = $submissionVars['dataroot'];
- $CONFIG->dataroot = $dataroot;
- $cache = new ElggFileCache($dataroot);
- $cache->delete('view_paths');
-
return TRUE;
}