Commands fixes

This commit is contained in:
Dmitry Khomutov 2017-02-05 11:18:33 +07:00
commit ed532bad7d
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
24 changed files with 100 additions and 479 deletions

View file

@ -82,10 +82,9 @@ class InstallCommand extends Command
}
$output->writeln('');
$conf = [];
$conf = [];
$conf['b8']['database'] = $db;
$conf['php-censor'] = $this->getConfigInformation($input, $output);
$conf['php-censor'] = $this->getConfigInformation($input, $output);
$this->writeConfigFile($conf);
$this->setupDatabase($output);
@ -375,8 +374,9 @@ class InstallCommand extends Command
]
];
$dbPort = (integer)$dbPort;
if ($dbPort) {
$dbServers[0]['port'] = (integer)$dbPort;
$dbServers[0]['port'] = $dbPort;
}
$db['servers']['read'] = $dbServers;
@ -402,8 +402,8 @@ class InstallCommand extends Command
{
try {
$dns = $db['type'] . ':host=' . $db['servers']['write'][0]['host'];
if (isset($db['servers']['write'][0]['host'])) {
$dns .= ';port=' . (integer)$db['servers']['write'][0]['host'];
if (isset($db['servers']['write'][0]['port'])) {
$dns .= ';port=' . (integer)$db['servers']['write'][0]['port'];
}
$dns .= ';dbname=' . $db['name'];