Skip to content

Commit

Permalink
Remove Drupal core code drupal_set_message in theme install and unins…
Browse files Browse the repository at this point in the history
…tall commands. Fix the message for theme install command when dependencies are not met (#3697)
  • Loading branch information
LOBsTerr authored and jmolivas committed Jan 17, 2018
1 parent 4a8746c commit 02acda8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Command/Theme/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
} catch (UnmetDependenciesException $e) {
$this->getIo()->error(
sprintf(
$this->trans('commands.theme.install.messages.success'),
$this->trans('commands.theme.install.messages.dependencies'),
$theme
)
);
drupal_set_message($e->getTranslatedMessage($this->getStringTranslation(), $theme), 'error');

return 1;
}
Expand Down
3 changes: 1 addition & 2 deletions src/Command/Theme/UninstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->themeHandler->refreshInfo();
$theme = $input->getArgument('theme');

$themes = $this->themeHandler->rebuildThemeData();
$themes = $this->themeHandler->rebuildThemeData();
$themesAvailable = [];
$themesUninstalled = [];
$themesUnavailable = [];
Expand Down Expand Up @@ -183,7 +183,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$e->getMessage()
)
);
drupal_set_message($e->getTranslatedMessage($this->getStringTranslation(), $theme), 'error');

return 1;
}
Expand Down

0 comments on commit 02acda8

Please sign in to comment.