Skip to content
Snippets Groups Projects
Unverified Commit b0211a54 authored by Thomas Müller's avatar Thomas Müller
Browse files

Repair steps no longer implement the Emitter interface

parent f91e5f87
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,6 @@ class Repair implements IOutput{ ...@@ -73,7 +73,6 @@ class Repair implements IOutput{
* Run a series of repair steps for common problems * Run a series of repair steps for common problems
*/ */
public function run() { public function run() {
$self = $this;
if (count($this->repairSteps) === 0) { if (count($this->repairSteps) === 0) {
$this->emit('\OC\Repair', 'info', array('No repair steps available')); $this->emit('\OC\Repair', 'info', array('No repair steps available'));
return; return;
...@@ -82,16 +81,6 @@ class Repair implements IOutput{ ...@@ -82,16 +81,6 @@ class Repair implements IOutput{
foreach ($this->repairSteps as $step) { foreach ($this->repairSteps as $step) {
$this->currentStep = $step->getName(); $this->currentStep = $step->getName();
$this->emit('\OC\Repair', 'step', [$this->currentStep]); $this->emit('\OC\Repair', 'step', [$this->currentStep]);
if ($step instanceof Emitter) {
$step->listen('\OC\Repair', 'warning', function ($description) use ($self) {
$self->emit('\OC\Repair', 'warning', array($description));
});
$step->listen('\OC\Repair', 'info', function ($description) use ($self) {
$self->emit('\OC\Repair', 'info', array($description));
});
}
$step->run($this); $step->run($this);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment