|
@@ 243-252 (lines=10) @@
|
| 240 |
|
$message = ''; |
| 241 |
|
$oneServiceStopped = false; |
| 242 |
|
|
| 243 |
|
foreach ($this->config->activatedServices() as $service) { |
| 244 |
|
$timerId = $this->config->get('workflow', 'timer_' . $service . '_id'); |
| 245 |
|
|
| 246 |
|
if ($this->$service->stopTimer($timerId) === true) { |
| 247 |
|
$oneServiceStopped = true; |
| 248 |
|
$message .= '- ' . ucfirst($service) . ': stopped' . "\r\n"; |
| 249 |
|
} else { |
| 250 |
|
$message .= '- ' . ucfirst($service) . ': cannot stop' . "\r\n"; |
| 251 |
|
} |
| 252 |
|
} |
| 253 |
|
|
| 254 |
|
if ($oneServiceStopped === true) { |
| 255 |
|
$this->config->update('workflow', 'is_timer_running', false); |
|
@@ 290-297 (lines=8) @@
|
| 287 |
|
|
| 288 |
|
$oneTimerDeleted = false; |
| 289 |
|
|
| 290 |
|
foreach ($this->config->servicesToUndo() as $service) { |
| 291 |
|
if ($this->deleteServiceTimer($service, $this->config->get('workflow', 'timer_' . $service . '_id')) === true) { |
| 292 |
|
$oneTimerDeleted = true; |
| 293 |
|
$message .= '- ' . ucfirst($service) . ': undid' . "\r\n"; |
| 294 |
|
} else { |
| 295 |
|
$message .= '- ' . ucfirst($service) . ': cannot undo' . "\r\n"; |
| 296 |
|
} |
| 297 |
|
} |
| 298 |
|
|
| 299 |
|
if ($oneTimerDeleted === true) { |
| 300 |
|
$this->config->update('workflow', 'is_timer_running', false); |