diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-11-12 13:23:31 -0800 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-11-12 13:23:31 -0800 |
commit | 7b53c9d3f07bf630d38a7a9c92ee44a3fb9b0f21 (patch) | |
tree | cf02c2d80277757189fc3400a44484dc7f97ba29 /lib/base.php | |
parent | 910a25adbd2ee525b228c8b0d0f73d867fd237d6 (diff) | |
parent | 6d097529405a7e7791b4daac1909bafd38445c5c (diff) | |
download | nextcloud-server-7b53c9d3f07bf630d38a7a9c92ee44a3fb9b0f21.tar.gz nextcloud-server-7b53c9d3f07bf630d38a7a9c92ee44a3fb9b0f21.zip |
Merge pull request #157 from owncloud/setup
Make lib/setup.php usable outside of install setup
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/base.php b/lib/base.php index 50617081b1f..c97700b3dbf 100644 --- a/lib/base.php +++ b/lib/base.php @@ -227,9 +227,7 @@ class OC{ if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) { if(!OC_Util::ishtaccessworking()) { if(!file_exists(OC::$SERVERROOT.'/data/.htaccess')) { - $content = "deny from all\n"; - $content.= "IndexIgnore *"; - file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content); + OC_Setup::protectDataDirectory(); } } } @@ -481,17 +479,7 @@ class OC{ */ public static function handleRequest() { if (!OC_Config::getValue('installed', false)) { - // Check for autosetup: - $autosetup_file = OC::$SERVERROOT."/config/autoconfig.php"; - if( file_exists( $autosetup_file )) { - OC_Log::write('core', 'Autoconfig file found, setting up owncloud...', OC_Log::INFO); - include $autosetup_file; - $_POST['install'] = 'true'; - $_POST = array_merge ($_POST, $AUTOCONFIG); - unlink($autosetup_file); - } - OC_Util::addScript('setup'); - require_once 'setup.php'; + require_once 'core/setup.php'; exit(); } // Handle WebDAV |