Merge pull request #15745 from nextcloud/backport/15738/stable16
[stable16] Don't notify admins if no potentially over exposing links found
This commit is contained in:
commit
73e4594e08
1 changed files with 7 additions and 7 deletions
|
@ -201,8 +201,7 @@ class RemoveLinkShares implements IRepairStep {
|
|||
}
|
||||
}
|
||||
|
||||
private function repair(IOutput $output): void {
|
||||
$total = $this->getTotal();
|
||||
private function repair(IOutput $output, int $total): void {
|
||||
$output->startProgress($total);
|
||||
|
||||
$shareCursor = $this->getShares();
|
||||
|
@ -225,12 +224,13 @@ class RemoveLinkShares implements IRepairStep {
|
|||
}
|
||||
|
||||
public function run(IOutput $output): void {
|
||||
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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue