]> source.dussan.org Git - nextcloud-server.git/commitdiff
Run `updateDataDirectory` after Update
authorLukas Reschke <lukas@owncloud.com>
Thu, 19 Feb 2015 01:15:21 +0000 (02:15 +0100)
committerLukas Reschke <lukas@owncloud.com>
Mon, 2 Mar 2015 18:39:17 +0000 (19:39 +0100)
Fixes https://github.com/owncloud/core/issues/13731

lib/private/updater.php

index 71ada3217e0216d0738f7fc2db68f44b3ca9b90e..af1961663552c89ee582d8814113c2a0d16e18a5 100644 (file)
@@ -12,6 +12,7 @@ use OC\Hooks\BasicEmitter;
 use OC_App;
 use OC_Util;
 use OCP\IConfig;
+use OC\Setup;
 
 /**
  * Class that handles autoupdating of ownCloud
@@ -188,13 +189,12 @@ class Updater extends BasicEmitter {
                        throw new \Exception('Updates between multiple major versions are unsupported.');
                }
 
-               // Update htaccess files for apache hosts
-               if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
-                       try {
-                               \OC\Setup::updateHtaccess();
-                       } catch (\Exception $e) {
-                               throw new \Exception($e->getMessage());
-                       }
+               // Update .htaccess files
+               try {
+                       Setup::updateHtaccess();
+                       Setup::protectDataDirectory();
+               } catch (\Exception $e) {
+                       throw new \Exception($e->getMessage());
                }
 
                // create empty file in data dir, so we can later find