diff options
Diffstat (limited to 'lib/private/Repair/RepairDavShares.php')
-rw-r--r-- | lib/private/Repair/RepairDavShares.php | 47 |
1 files changed, 9 insertions, 38 deletions
diff --git a/lib/private/Repair/RepairDavShares.php b/lib/private/Repair/RepairDavShares.php index 64104c1e28a..557e2c080ca 100644 --- a/lib/private/Repair/RepairDavShares.php +++ b/lib/private/Repair/RepairDavShares.php @@ -1,28 +1,11 @@ <?php declare(strict_types=1); + /** - * @copyright Copyright (c) 2020 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * 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 - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\Repair; use OCP\DB\Exception; @@ -40,27 +23,15 @@ use function urlencode; class RepairDavShares implements IRepairStep { protected const GROUP_PRINCIPAL_PREFIX = 'principals/groups/'; - /** @var IConfig */ - private $config; - /** @var IDBConnection */ - private $dbc; - /** @var IGroupManager */ - private $groupManager; - /** @var LoggerInterface */ - private $logger; /** @var bool */ private $hintInvalidShares = false; public function __construct( - IConfig $config, - IDBConnection $dbc, - IGroupManager $groupManager, - LoggerInterface $logger + private IConfig $config, + private IDBConnection $dbc, + private IGroupManager $groupManager, + private LoggerInterface $logger, ) { - $this->config = $config; - $this->dbc = $dbc; - $this->groupManager = $groupManager; - $this->logger = $logger; } /** @@ -125,8 +96,8 @@ class RepairDavShares implements IRepairStep { * @inheritDoc */ public function run(IOutput $output) { - $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0'); - if (version_compare($versionFromBeforeUpdate, '20.0.7', '<') + $versionFromBeforeUpdate = $this->config->getSystemValueString('version', '0.0.0'); + if (version_compare($versionFromBeforeUpdate, '20.0.8', '<') && $this->repairUnencodedGroupShares() ) { $output->info('Repaired DAV group shares'); |