default to an empty string for database password if ommited
fix null passwords remove password trimming
This commit is contained in:
parent
8c7db2536d
commit
b0d1d61db2
|
@ -49,7 +49,7 @@ class Install extends Command {
|
||||||
->addOption('database-name', null, InputOption::VALUE_REQUIRED, 'Name of the database')
|
->addOption('database-name', null, InputOption::VALUE_REQUIRED, 'Name of the database')
|
||||||
->addOption('database-host', null, InputOption::VALUE_REQUIRED, 'Hostname of the database', 'localhost')
|
->addOption('database-host', null, InputOption::VALUE_REQUIRED, 'Hostname of the database', 'localhost')
|
||||||
->addOption('database-user', null, InputOption::VALUE_REQUIRED, 'User name to connect to the database')
|
->addOption('database-user', null, InputOption::VALUE_REQUIRED, 'User name to connect to the database')
|
||||||
->addOption('database-pass', null, InputOption::VALUE_REQUIRED, 'Password of the database user')
|
->addOption('database-pass', null, InputOption::VALUE_REQUIRED, 'Password of the database user', null)
|
||||||
->addOption('database-table-prefix', null, InputOption::VALUE_OPTIONAL, 'Prefix for all tables (default: oc_)', null)
|
->addOption('database-table-prefix', null, InputOption::VALUE_OPTIONAL, 'Prefix for all tables (default: oc_)', null)
|
||||||
->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'User name of the admin account', 'admin')
|
->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'User name of the admin account', 'admin')
|
||||||
->addOption('admin-pass', null, InputOption::VALUE_REQUIRED, 'Password of the admin account')
|
->addOption('admin-pass', null, InputOption::VALUE_REQUIRED, 'Password of the admin account')
|
||||||
|
@ -102,6 +102,9 @@ class Install extends Command {
|
||||||
$dbTablePrefix = (string) $input->getOption('database-table-prefix');
|
$dbTablePrefix = (string) $input->getOption('database-table-prefix');
|
||||||
$dbTablePrefix = trim($dbTablePrefix);
|
$dbTablePrefix = trim($dbTablePrefix);
|
||||||
}
|
}
|
||||||
|
if ($input->hasParameterOption('--database-pass')) {
|
||||||
|
$dbPass = (string) $input->getOption('database-pass');
|
||||||
|
}
|
||||||
$adminLogin = $input->getOption('admin-user');
|
$adminLogin = $input->getOption('admin-user');
|
||||||
$adminPassword = $input->getOption('admin-pass');
|
$adminPassword = $input->getOption('admin-pass');
|
||||||
$dataDir = $input->getOption('data-dir');
|
$dataDir = $input->getOption('data-dir');
|
||||||
|
|
Loading…
Reference in New Issue