summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2021-01-29 17:43:58 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-02-02 20:52:16 +0000
commit6ebb36826535a01cc94728470d54a019a6cf3d2b (patch)
tree4b2b1f3892a33796de2df634614007df4c5d98e5
parentcfc00aa2cdc4bc1448c21e8d9789c663c8fb4b2d (diff)
downloadnextcloud-server-6ebb36826535a01cc94728470d54a019a6cf3d2b.tar.gz
nextcloud-server-6ebb36826535a01cc94728470d54a019a6cf3d2b.zip
show suggestion to clean up possible invalid shares later
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r--lib/private/Repair/RepairDavShares.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Repair/RepairDavShares.php b/lib/private/Repair/RepairDavShares.php
index ff4c51484eb..64104c1e28a 100644
--- a/lib/private/Repair/RepairDavShares.php
+++ b/lib/private/Repair/RepairDavShares.php
@@ -48,6 +48,8 @@ class RepairDavShares implements IRepairStep {
private $groupManager;
/** @var LoggerInterface */
private $logger;
+ /** @var bool */
+ private $hintInvalidShares = false;
public function __construct(
IConfig $config,
@@ -88,6 +90,7 @@ class RepairDavShares implements IRepairStep {
|| !$this->groupManager->groupExists($gid)
|| ($gid !== $decodedGid && $this->groupManager->groupExists($decodedGid))
) {
+ $this->hintInvalidShares = $this->hintInvalidShares || $gid !== $encodedGid;
continue;
}
@@ -127,6 +130,9 @@ class RepairDavShares implements IRepairStep {
&& $this->repairUnencodedGroupShares()
) {
$output->info('Repaired DAV group shares');
+ if ($this->hintInvalidShares) {
+ $output->info('Invalid shares might be left in the database, running "occ dav:remove-invalid-shares" can remove them.');
+ }
}
}
}