Skip to content
Snippets Groups Projects

Issue #3239994: Message that purge is disabled/enabled is shown twice in drush

3 files
+ 7
9
Compare changes
  • Side-by-side
  • Inline

Files

@@ -21,7 +21,7 @@ class PurgeControlCommands extends DrushCommands {
/**
* PurgeControl service.
*
* @var Drupal\purge_control\Services\PurgeControl
* @var \Drupal\purge_control\Services\PurgeControl
*/
protected $purgeControl;
@@ -55,19 +55,17 @@ class PurgeControlCommands extends DrushCommands {
public function purgeControl(string $op) {
if ($op == 'enable-purge' || $op == 'enp') {
$this->purgeControl->enablePurge();
$this->logger()->success(dt('Purging is enabled.'));
}
elseif ($op == 'disable-purge' || $op == 'disp') {
$this->purgeControl->disablePurge();
$this->logger()->success(dt('Purging is disabled.'));
}
elseif ($op == 'enable-automation' || $op == 'ena') {
$this->purgeControl->setAutomation(TRUE);
$this->logger()->success(dt('Automated purge control is enabled.'));
$this->logger()->notice(dt('Automated purge control is enabled.'));
}
elseif ($op == 'disable-automation' || $op == 'disa') {
$this->purgeControl->setAutomation(FALSE);
$this->logger()->success(dt('Automated purge control is disabled.'));
$this->logger()->notice(dt('Automated purge control is disabled.'));
}
else {
$this->logger()->error(dt('Invalid operation.'));
Loading