]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #157 from owncloud/setup
authorBart Visscher <bartv@thisnet.nl>
Mon, 12 Nov 2012 21:23:31 +0000 (13:23 -0800)
committerBart Visscher <bartv@thisnet.nl>
Mon, 12 Nov 2012 21:23:31 +0000 (13:23 -0800)
Make lib/setup.php usable outside of install setup

1  2 
lib/base.php
lib/setup.php

diff --cc lib/base.php
index 50617081b1fa99020a07e2037dc0256b2c9f4f94,de458cedb1e63a5ca717b4c66b553f40de63c6ce..c97700b3dbfc311d197e8d1a31f8ab733c94bd8d
@@@ -227,12 -225,10 +227,10 @@@ 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();
                                                }
                                        }
 -                              }               
 +                              }
                                OC_Log::write('core', 'starting upgrade from '.$installedVersion.' to '.$currentVersion, OC_Log::DEBUG);
                                $result=OC_DB::updateDbFromStructure(OC::$SERVERROOT.'/db_structure.xml');
                                if(!$result) {
diff --cc lib/setup.php
Simple merge