Use util function to protect datadirectory in setup

This commit is contained in:
Bart Visscher 2012-11-13 08:54:19 +01:00
parent ac22cd4ab0
commit ad85087fcc
1 changed files with 2 additions and 3 deletions

View File

@ -18,9 +18,8 @@ $hasPostgreSQL = is_callable('pg_connect');
$hasOracle = is_callable('oci_connect');
$datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data');
// Test if .htaccess is working
$content = "deny from all";
file_put_contents(OC::$SERVERROOT.'/data/.htaccess', $content);
// Protect data directory here, so we can test if the protection is working
OC_Setup::protectDataDirectory();
$opts = array(
'hasSQLite' => $hasSQLite,