Skip to content

Commit

Permalink
3955 site status (#3958)
Browse files Browse the repository at this point in the history
* Add new arguments key and target. Make it possible use not only default target for db connections

* Add tags striping for titles

* Add description to the report

* Fix translation string for default and admin themes
  • Loading branch information
LOBsTerr authored Apr 5, 2019
1 parent 754b55f commit aeeb3a3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Command/Site/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,11 @@ protected function getSystemData()
$title = $requirement['title'];
}

$systemData['system'][$title] = strip_tags($requirement['value']);
$value = empty($requirement['description']) ? $requirement['value'] : $requirement['value'] . ' (' . $requirement['description'] . ')';
$systemData['system'][strip_tags($title)] = strip_tags($value); ;
}


if ($this->settings) {
try {
$hashSalt = $this->settings->getHashSalt();
Expand All @@ -177,11 +179,11 @@ protected function getConnectionData()

$connectionData = [];
foreach ($this->connectionInfoKeys as $connectionInfoKey) {
if ("password" == $connectionInfoKey) {
if ('password' == $connectionInfoKey) {
continue;
}

$connectionKey = $this->trans('commands.site.status.messages.'.$connectionInfoKey);
$connectionKey = $this->trans('commands.site.status.messages.' . $connectionInfoKey);
$connectionData['database'][$connectionKey] = $connectionInfo['default'][$connectionInfoKey];
}

Expand All @@ -191,7 +193,7 @@ protected function getConnectionData()
$connectionInfo['default']['username'],
$connectionInfo['default']['password'],
$connectionInfo['default']['host'],
$connectionInfo['default']['port'] ? ':'.$connectionInfo['default']['port'] : '',
$connectionInfo['default']['port'] ? ':' . $connectionInfo['default']['port'] : '',
$connectionInfo['default']['database']
);

Expand All @@ -204,8 +206,8 @@ protected function getThemeData()

return [
'theme' => [
$this->trans('commands.site.status.messages.theme_default') => $config->get('default'),
$this->trans('commands.site.status.messages.theme_admin') => $config->get('admin'),
$this->trans('commands.site.status.messages.theme-default') => $config->get('default'),
$this->trans('commands.site.status.messages.theme-admin') => $config->get('admin'),
],
];
}
Expand Down

0 comments on commit aeeb3a3

Please sign in to comment.