Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable16] Don't notify admins if no potentially over exposing links found #15745

Merged
merged 1 commit into from
May 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/private/Repair/RemoveLinkShares.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ private function sendNotification(): void {
}
}

private function repair(IOutput $output): void {
$total = $this->getTotal();
private function repair(IOutput $output, int $total): void {
$output->startProgress($total);

$shareCursor = $this->getShares();
Expand All @@ -225,12 +224,13 @@ private function repair(IOutput $output): void {
}

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');
}
}