Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 8c0bc6e9e99f1dedbb2b4eb92fb6cdc4 > files > 2

nextcloud-13.0.12-1.mga6.src.rpm

diff --git a/core/Command/Maintenance/UpdateHtaccess.php b/core/Command/Maintenance/UpdateHtaccess.php
deleted file mode 100644
index 4b9c8a7..0000000
--- a/core/Command/Maintenance/UpdateHtaccess.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Joas Schilling <coding@schilljs.com>
- * @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) {
-		if (\OC\Setup::updateHtaccess()) {
-			$output->writeln('.htaccess has been updated');
-			return 0;
-		} else {
-			$output->writeln('<error>Error updating .htaccess file, not enough permissions?</error>');
-			return 1;
-		}
-	}
-}
diff --git a/core/register_command.php b/core/register_command.php
index 372d775..7a9de28 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -135,7 +135,6 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
 	$application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader()));
 	$application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector()));
 	$application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
-	$application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
 	$application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory()));
 
 	$application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class)));
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 92246e8..3bfe674 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -388,10 +388,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
-			self::updateHtaccess();
-			self::protectDataDirectory();
-
 			self::installBackgroundJobs();
 
 			//and we are done
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 996163d..6a3fa3d 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -240,14 +240,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)