aboutsummaryrefslogtreecommitdiff
path: root/install/ElggInstaller.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-12 10:58:36 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-12 10:58:36 +0000
commitc7559da210c9dba080ff5de243240b3be7f2c857 (patch)
tree2789d3d710ee03c40144cd789fac96aed8c86050 /install/ElggInstaller.php
parente9f48ae4ce8fa566b177c2ff5d0673011498b6a5 (diff)
downloadelgg-c7559da210c9dba080ff5de243240b3be7f2c857.tar.gz
elgg-c7559da210c9dba080ff5de243240b3be7f2c857.tar.bz2
better handling of settings file issues during installation
git-svn-id: http://code.elgg.org/elgg/trunk@7063 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'install/ElggInstaller.php')
-rw-r--r--install/ElggInstaller.php27
1 files changed, 18 insertions, 9 deletions
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php
index 57940dda3..e8220ff45 100644
--- a/install/ElggInstaller.php
+++ b/install/ElggInstaller.php
@@ -5,7 +5,7 @@
*
* @package Elgg
* @subpackage Installer
- * @author Curverider Ltd
+ * @author Cash Costello and Curverider Ltd
* @link http://elgg.org/
*/
@@ -141,7 +141,7 @@ class ElggInstaller {
$this->checkRewriteRules($report);
// check for existence of settings file
- if ($this->checkSettingsFile() != TRUE) {
+ if ($this->checkSettingsFile($report) != TRUE) {
// no file, so check permissions on engine directory
$this->checkEngineDir($report);
}
@@ -459,8 +459,7 @@ class ElggInstaller {
protected function setInstallStatus() {
global $CONFIG;
- $settingsCreated = $this->checkSettingsFile();
- if ($settingsCreated == FALSE) {
+ if (!is_readable("{$CONFIG->path}engine/settings.php")) {
return;
}
@@ -746,7 +745,7 @@ class ElggInstaller {
$writable = is_writable("{$CONFIG->path}engine");
if (!$writable) {
- $report['engine'] = array(
+ $report['settings'] = array(
array(
'severity' => 'failure',
'message' => elgg_echo('install:check:enginedir'),
@@ -760,16 +759,26 @@ class ElggInstaller {
/**
* Check that the settings file exists
+ * @param array $report
* @return bool
*/
- protected function checkSettingsFile() {
+ protected function checkSettingsFile(&$report) {
global $CONFIG;
- if (is_readable("{$CONFIG->path}engine/settings.php")) {
- return TRUE;
+ if (!file_exists("{$CONFIG->path}engine/settings.php")) {
+ return FALSE;
}
- return FALSE;
+ if (!is_readable("{$CONFIG->path}engine/settings.php")) {
+ $report['settings'] = array(
+ array(
+ 'severity' => 'failure',
+ 'message' => elgg_echo('install:check:readsettings'),
+ )
+ );
+ }
+
+ return TRUE;
}
/**