Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates-src > by-pkgid > dc5feca39412fbab1eebceada9450c1e > files > 2

nextcloud-12.0.6-3.mga6.src.rpm

diff -Naur -x '*.orig' -x '*.rej' -x '*~' nextcloud/core/Command/Maintenance/UpdateHtaccess.php nextcloud-dont_update_htacess/core/Command/Maintenance/UpdateHtaccess.php
--- nextcloud/core/Command/Maintenance/UpdateHtaccess.php	2017-08-13 12:44:44.000000000 +0200
+++ nextcloud-dont_update_htacess/core/Command/Maintenance/UpdateHtaccess.php	1970-01-01 01:00:00.000000000 +0100
@@ -1,49 +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) {
-		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 -Naur -x '*.orig' -x '*.rej' -x '*~' nextcloud/core/register_command.php nextcloud-dont_update_htacess/core/register_command.php
--- nextcloud/core/register_command.php	2017-08-13 12:44:44.000000000 +0200
+++ nextcloud-dont_update_htacess/core/register_command.php	2017-09-13 20:59:08.993257352 +0200
@@ -124,7 +124,6 @@
 	$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\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger()));
 	$application->add(new OC\Core\Command\Maintenance\Repair(
diff -Naur -x '*.orig' -x '*.rej' -x '*~' nextcloud/lib/private/Setup.php nextcloud-dont_update_htacess/lib/private/Setup.php
--- nextcloud/lib/private/Setup.php	2017-08-13 12:44:44.000000000 +0200
+++ nextcloud-dont_update_htacess/lib/private/Setup.php	2017-09-13 20:59:36.717057583 +0200
@@ -387,10 +387,6 @@
 			// 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();
-
 			self::installBackgroundJobs();
 
 			//and we are done
diff -Naur -x '*.orig' -x '*.rej' -x '*~' nextcloud/lib/private/Updater.php nextcloud-dont_update_htacess/lib/private/Updater.php
--- nextcloud/lib/private/Updater.php	2017-08-13 12:44:44.000000000 +0200
+++ nextcloud-dont_update_htacess/lib/private/Updater.php	2017-09-13 20:57:54.823786965 +0200
@@ -231,14 +231,6 @@
 			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)