diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-10-29 22:44:49 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2012-10-29 22:44:49 +0100 |
commit | f6b6780072134998919a66ed4c99922c40d2a937 (patch) | |
tree | 7340d4c7a05b6782798776d509071e9835ae0d9e | |
parent | 6903475841d4687246d9206ae72ed192948f4db8 (diff) | |
download | nextcloud-server-f6b6780072134998919a66ed4c99922c40d2a937.tar.gz nextcloud-server-f6b6780072134998919a66ed4c99922c40d2a937.zip |
Don't use OC_Setup as it will show up the installer
-rw-r--r-- | lib/base.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 18118a93b64..5c3d3fb80ce 100644 --- a/lib/base.php +++ b/lib/base.php @@ -224,7 +224,11 @@ class OC{ // Check if the .htaccess is existing - this is needed for upgrades from really old ownCloud versions if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) { if(!OC_Util::ishtaccessworking()) { - OC_Setup::createHtaccess(); + 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_Log::write('core', 'starting upgrade from '.$installedVersion.' to '.$currentVersion, OC_Log::DEBUG); |