]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3062 checks if data directory exists
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 20 Mar 2011 22:43:59 +0000 (22:43 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 20 Mar 2011 22:43:59 +0000 (22:43 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8791 36083f99-b078-4883-b0ff-0f9b5a30f544

install/ElggInstaller.php
install/languages/en.php

index 900ab6fb090dd384ebc3ea61aa3cf8281e5b9dbf..a09657f7eaa7844b5da4fa333a09584746dd7d13 100644 (file)
@@ -1257,6 +1257,13 @@ class ElggInstaller {
                        }
                }
 
+               // check that data root is writable
+               if (!file_exists($submissionVars['dataroot'])) {
+                       $msg = elgg_echo('install:error:datadirectoryexists', array($submissionVars['dataroot']));
+                       register_error($msg);
+                       return FALSE;
+               }
+
                // check that data root is writable
                if (!is_writable($submissionVars['dataroot'])) {
                        $msg = elgg_echo('install:error:writedatadirectory', array($submissionVars['dataroot']));
index 73a862cd0e2dcc1afbe5d2f8c853e12f132c361d..80716069d2eb7d64353ae991c1c41e076049b166 100644 (file)
@@ -126,6 +126,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: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.',
        'install:error:emailaddress' => '%s is not a valid email address',