summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-06-05 10:49:32 +0200
committerGitHub <noreply@github.com>2019-06-05 10:49:32 +0200
commit6af72d1817e87b3861089c18293d55028f273a43 (patch)
tree3694e0a523f0339437d01c687f727ecbc9e6d9a4 /lib
parent58da6559fe54efa39690f3ba98679a880316824a (diff)
parentc34bdac5ae98c217c5db9d99158eddfbf790e31c (diff)
downloadnextcloud-server-6af72d1817e87b3861089c18293d55028f273a43.tar.gz
nextcloud-server-6af72d1817e87b3861089c18293d55028f273a43.zip
Merge pull request #15862 from nextcloud/backport/15738/stable14
[stable14] Don't notify admins if no potentially over exposing links found
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Repair/RemoveLinkShares.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Repair/RemoveLinkShares.php b/lib/private/Repair/RemoveLinkShares.php
index 1f3dd67f96f..66c850be2af 100644
--- a/lib/private/Repair/RemoveLinkShares.php
+++ b/lib/private/Repair/RemoveLinkShares.php
@@ -201,8 +201,7 @@ class RemoveLinkShares implements IRepairStep {
}
}
- private function repair(IOutput $output) {
- $total = $this->getTotal();
+ private function repair(IOutput $output, $total) {
$output->startProgress($total);
$shareCursor = $this->getShares();
@@ -225,12 +224,13 @@ class RemoveLinkShares implements IRepairStep {
}
public function run(IOutput $output) {
- if ($this->shouldRun()) {
- $output->info('Removing potentially over exposing link shares');
- $this->repair($output);
- $output->info('Removed potentially over exposing link shares');
- } else {
+ if ($this->shouldRun() === false || ($total = $this->getTotal()) === 0) {
$output->info('No need to remove link shares.');
+ return;
}
+
+ $output->info('Removing potentially over exposing link shares');
+ $this->repair($output, $total);
+ $output->info('Removed potentially over exposing link shares');
}
}