summaryrefslogtreecommitdiffstats
path: root/nextcloud-9.1.0-dont_update_htacess.patch
blob: c23e530da042d0b015cf7f9eb79183a5b33f29c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
diff --git a/core/Command/Maintenance/UpdateHtaccess.php b/core/Command/Maintenance/UpdateHtaccess.php
deleted file mode 100644
index 2185078..0000000
--- a/core/Command/Maintenance/UpdateHtaccess.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Lukas Reschke <lukas@statuscode.ch>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- *
- */
-namespace OC\Core\Command\Maintenance;
-
-use InvalidArgumentException;
-use OC\Setup;
-use OCP\IConfig;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-
-class UpdateHtaccess extends Command {
-
-	protected function configure() {
-		$this
-			->setName('maintenance:update:htaccess')
-			->setDescription('Updates the .htaccess file');
-	}
-
-	protected function execute(InputInterface $input, OutputInterface $output) {
-		\OC\Setup::updateHtaccess();
-		$output->writeln('.htaccess has been updated');
-		return 0;
-	}
-}
diff --git a/core/register_command.php b/core/register_command.php
index 6f20769..09535fe 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -60,7 +60,7 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
 	$application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager()));
 	$application->add(new OC\Core\Command\App\GetPath());
 	$application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager()));
-	
+
 	$application->add(new OC\Core\Command\TwoFactorAuth\Enable(
 		\OC::$server->getTwoFactorAuthManager(), \OC::$server->getUserManager()
 	));
@@ -126,7 +126,6 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
 		new \OC\Repair(\OC\Repair::getRepairSteps(), \OC::$server->getEventDispatcher()), \OC::$server->getConfig(),
 		\OC::$server->getEventDispatcher()));
 	$application->add(new OC\Core\Command\Maintenance\SingleUser(\OC::$server->getConfig()));
-	$application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
 
 	$application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger()));
 
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 3b3a57c..cd56795 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -379,10 +379,6 @@ class Setup {
 			// out that this is indeed an ownCloud data directory
 			file_put_contents($config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', '');
 
-			// Update .htaccess files
-			Setup::updateHtaccess();
-			Setup::protectDataDirectory();
-
 			//try to write logtimezone
 			if (date_default_timezone_get()) {
 				$config->setSystemValue('logtimezone', date_default_timezone_get());
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 609e965..85d4869 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -237,14 +237,6 @@ class Updater extends BasicEmitter {
 			throw new \Exception('Updates between multiple major versions and downgrades are unsupported.');
 		}
 
-		// 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
 		// out that this is indeed an ownCloud data directory
 		// (in case it didn't exist before)