aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install/ElggInstaller.php15
-rw-r--r--install/languages/en.php3
2 files changed, 17 insertions, 1 deletions
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php
index 94709ac4e..03c84a43e 100644
--- a/install/ElggInstaller.php
+++ b/install/ElggInstaller.php
@@ -1337,6 +1337,21 @@ class ElggInstaller {
}
}
+ // check that data root is absolute path
+ if (stripos(PHP_OS, 'win') === 0) {
+ if (strpos($submissionVars['dataroot'], ':') !== 1) {
+ $msg = elgg_echo('install:error:relative_path', array($submissionVars['dataroot']));
+ register_error($msg);
+ return FALSE;
+ }
+ } else {
+ if (strpos($submissionVars['dataroot'], '/') !== 0) {
+ $msg = elgg_echo('install:error:relative_path', array($submissionVars['dataroot']));
+ register_error($msg);
+ return FALSE;
+ }
+ }
+
// check that data root exists
if (!file_exists($submissionVars['dataroot'])) {
$msg = elgg_echo('install:error:datadirectoryexists', array($submissionVars['dataroot']));
diff --git a/install/languages/en.php b/install/languages/en.php
index c452fc793..3a692e020 100644
--- a/install/languages/en.php
+++ b/install/languages/en.php
@@ -88,7 +88,7 @@ If you are ready to proceed, click the Next button.",
'install:settings:help:siteemail' => 'Email address used by Elgg for communication with users',
'install:settings:help:wwwroot' => 'The address of the site (Elgg usually guesses this correctly)',
'install:settings:help:path' => 'The directory where you put the Elgg code (Elgg usually guesses this correctly)',
- 'install:settings:help:dataroot' => 'The directory that you created for Elgg to save files (the permissions on this directory are checked when you click Next)',
+ 'install:settings:help:dataroot' => 'The directory that you created for Elgg to save files (the permissions on this directory are checked when you click Next). It must be an absolute path.',
'install:settings:help:dataroot:apache' => 'You have the option of Elgg creating the data directory or entering the directory that you already created for storing user files (the permissions on this directory are checked when you click Next)',
'install:settings:help:language' => 'The default language for the site',
'install:settings:help:siteaccess' => 'The default access level for new user created content',
@@ -131,6 +131,7 @@ If you are ready to proceed, click the Next button.",
'install:error:readsettingsphp' => 'Unable to read engine/settings.example.php',
'install:error:writesettingphp' => 'Unable to write engine/settings.php',
'install:error:requiredfield' => '%s is required',
+ 'install:error:relative_path' => 'We don\'t think "%s" is an absoluate path for your data directory',
'install:error:datadirectoryexists' => 'Your data directory %s does not exist.',
'install:error:writedatadirectory' => 'Your data directory %s is not writable by the web server.',
'install:error:locationdatadirectory' => 'Your data directory %s must be outside of your install path for security.',