]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge branch 'master' into append-error-document
authorThomas Müller <thomas.mueller@tmit.eu>
Wed, 2 Apr 2014 06:48:37 +0000 (08:48 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Wed, 2 Apr 2014 06:48:37 +0000 (08:48 +0200)
Conflicts:
lib/private/setup.php
lib/private/updater.php

1  2 
lib/private/setup.php
lib/private/updater.php

index 65f295ee347d91b36537e22b4128e27af6d552c8,b1061b3a25b7c351a66dafbb3211901b132ac4fb..4889f6033328b427efb8d4473692bd0776cc6680
@@@ -106,10 -106,13 +106,14 @@@ class OC_Setup 
                        //guess what this does
                        OC_Installer::installShippedApps();
  
 -                      //create htaccess files for apache hosts
+                       // create empty file in data dir, so we can later find
+                       // out that this is indeed an ownCloud data directory
+                       file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.ocdata', '');
 +                      // Update htaccess files for apache hosts
                        if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
 -                              self::createHtaccess();
 +                              self::updateHtaccess();
 +                              self::protectDataDirectory();
                        }
  
                        //and we are done
index 67764771fd0f4c84c0de5a12ff208ae1facf7ede,9f57aa0b6a0887c1042d54cfc5165a31d3549978..a59e3820debee8975b005614b81db971b78ee86f
@@@ -104,11 -102,11 +103,16 @@@ class Updater extends BasicEmitter 
                }
                $this->emit('\OC\Updater', 'maintenanceStart');
  
 +              // Update htaccess files for apache hosts
 +              if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
 +                      \OC_Setup::updateHtaccess();
 +              }
 +
+               // create empty file in data dir, so we can later find
+               // out that this is indeed an ownCloud data directory
+               // (in case it didn't exist before)
+               file_put_contents(\OC_Config::getValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', '');
                /*
                 * START CONFIG CHANGES FOR OLDER VERSIONS
                 */