]> source.dussan.org Git - nextcloud-server.git/commitdiff
Run .htaccess updates in any case
authorLukas Reschke <lukas@owncloud.com>
Tue, 1 Dec 2015 16:06:48 +0000 (17:06 +0100)
committerLukas Reschke <lukas@owncloud.com>
Tue, 8 Dec 2015 07:16:24 +0000 (08:16 +0100)
This is the same what we also do in updater.php and thus this aligns the code. Makes the code paths more consistent.

lib/private/setup.php
tests/lib/setup.php

index 33a9fe444627614c49fba7944f6e1b7e383ab63e..4a555b3e415ff1095b537c1ec32cf95562ca76bd 100644 (file)
@@ -369,11 +369,9 @@ class Setup {
                        // out that this is indeed an ownCloud data directory
                        file_put_contents($config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', '');
 
-                       // Update htaccess files for apache hosts
-                       if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
-                               self::updateHtaccess();
-                               self::protectDataDirectory();
-                       }
+                       // Update .htaccess files
+                       Setup::updateHtaccess();
+                       Setup::protectDataDirectory();
 
                        //try to write logtimezone
                        if (date_default_timezone_get()) {
index 72c845200563bba81d29a42c458cb65e54f2d754..bc78c14008fc0c28957aadc56ed2504a55c3fb8c 100644 (file)
@@ -130,17 +130,4 @@ class Test_OC_Setup extends \Test\TestCase {
                        ->will($this->returnValue('NotAnArray'));
                $this->setupClass->getSupportedDatabases();
        }
-
-       /**
-        * This is actual more an integration test whether the version parameter in the .htaccess
-        * was updated as well when the version has been incremented.
-        * If it hasn't this test will fail.
-        */
-       public function testHtaccessIsCurrent() {
-               $result = self::invokePrivate(
-                       $this->setupClass,
-                       'isCurrentHtaccess'
-               );
-               $this->assertTrue($result);
-       }
 }