From 0eb10007cf8d26c07e4e1759d1f698092f6dcd6e Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 15 May 2011 21:44:28 +0000 Subject: Refs #3453 added $CONFIG->data_dir_override so that people can put the data directory in Elgg's root if they want to. Will add instructions to the wiki on using this and protecting the directory git-svn-id: http://code.elgg.org/elgg/trunk@9089 36083f99-b078-4883-b0ff-0f9b5a30f544 --- install/ElggInstaller.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'install/ElggInstaller.php') diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php index 1a8edf1ae..719e9b67f 100644 --- a/install/ElggInstaller.php +++ b/install/ElggInstaller.php @@ -480,7 +480,7 @@ class ElggInstaller { 'required' => TRUE, ), ); - + if ($this->isAction) { do { if (!$this->validateAdminVars($submissionVars, $formVars)) { @@ -1302,6 +1302,7 @@ class ElggInstaller { * @return bool */ protected function validateSettingsVars($submissionVars, $formVars) { + global $CONFIG; foreach ($formVars as $field => $info) { $submissionVars[$field] = trim($submissionVars[$field]); @@ -1326,11 +1327,13 @@ class ElggInstaller { return FALSE; } - // check that data root is not subdirectory of Elgg root - if (stripos($submissionVars['dataroot'], $submissionVars['path']) !== FALSE) { - $msg = elgg_echo('install:error:locationdatadirectory', array($submissionVars['dataroot'])); - register_error($msg); - return FALSE; + if (!isset($CONFIG->data_dir_override) || !$CONFIG->data_dir_override) { + // check that data root is not subdirectory of Elgg root + if (stripos($submissionVars['dataroot'], $submissionVars['path']) !== FALSE) { + $msg = elgg_echo('install:error:locationdatadirectory', array($submissionVars['dataroot'])); + register_error($msg); + return FALSE; + } } // check that email address is email address -- cgit v1.2.3