summaryrefslogtreecommitdiffstats
path: root/owncloud-9.1.0-dont_update_htacess.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-07 13:24:37 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-07 13:24:37 +0200
commitdd2519b150dfbb1415677e4b78d1aef4ea80cf45 (patch)
tree220fba0651dffb97f92fb29b37c206b8bcbba35f /owncloud-9.1.0-dont_update_htacess.patch
parent808452fe81fbf96dfee7bd8082cab457cca5d780 (diff)
owncloud: 9.1.1 (backported from Fedora, thanks James)
Diffstat (limited to 'owncloud-9.1.0-dont_update_htacess.patch')
-rw-r--r--owncloud-9.1.0-dont_update_htacess.patch105
1 files changed, 105 insertions, 0 deletions
diff --git a/owncloud-9.1.0-dont_update_htacess.patch b/owncloud-9.1.0-dont_update_htacess.patch
new file mode 100644
index 0000000..c274855
--- /dev/null
+++ b/owncloud-9.1.0-dont_update_htacess.patch
@@ -0,0 +1,105 @@
+diff --git a/core/Command/Maintenance/UpdateHtaccess.php b/core/Command/Maintenance/UpdateHtaccess.php
+deleted file mode 100644
+index 5bfcb88..0000000
+--- a/core/Command/Maintenance/UpdateHtaccess.php
++++ /dev/null
+@@ -1,44 +0,0 @@
+-<?php
+-/**
+- * @author Lukas Reschke <lukas@statuscode.ch>
+- *
+- * @copyright Copyright (c) 2016, ownCloud, Inc.
+- * @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 ebb6ce8..bd28270 100644
+--- a/core/register_command.php
++++ b/core/register_command.php
+@@ -59,7 +59,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()
+ ));
+@@ -125,7 +125,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 46969f5..f171642 100644
+--- a/lib/private/Setup.php
++++ b/lib/private/Setup.php
+@@ -382,10 +382,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 229f112..3a2ce90 100644
+--- a/lib/private/Updater.php
++++ b/lib/private/Updater.php
+@@ -210,14 +210,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)