]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #3453 added $CONFIG->data_dir_override so that people can put the data directory...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 15 May 2011 21:44:28 +0000 (21:44 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 15 May 2011 21:44:28 +0000 (21:44 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@9089 36083f99-b078-4883-b0ff-0f9b5a30f544

install/ElggInstaller.php

index 1a8edf1aeffd32eab947bae1bc4b5d724d6f4af8..719e9b67f053aed65b431355c023d9da014f75b1 100644 (file)
@@ -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