aboutsummaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-15 21:44:28 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-15 21:44:28 +0000
commit0eb10007cf8d26c07e4e1759d1f698092f6dcd6e (patch)
tree868525f9b615bac6892ca818061f7020db60ee5c /install
parent77897d4efad074d9434a97a67052bc788c315dee (diff)
downloadelgg-0eb10007cf8d26c07e4e1759d1f698092f6dcd6e.tar.gz
elgg-0eb10007cf8d26c07e4e1759d1f698092f6dcd6e.tar.bz2
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
Diffstat (limited to 'install')
-rw-r--r--install/ElggInstaller.php15
1 files changed, 9 insertions, 6 deletions
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