aboutsummaryrefslogtreecommitdiff
path: root/install/ElggInstaller.php
diff options
context:
space:
mode:
Diffstat (limited to 'install/ElggInstaller.php')
-rw-r--r--install/ElggInstaller.php15
1 files changed, 15 insertions, 0 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']));