Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-09-06 22:08:08 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2016-09-06 22:20:02 +0300
commitb57a1063a3a2cb26ac909488fc27db65fde6e544 (patch)
treed1721e30c2e5618967b2aa5a9eb7f9fb61ab2d51 /core/Command/Maintenance
parent25546b6c832526e9a96eb4031205a9a65d1df60a (diff)
Move install over to QuestionHelper
Diffstat (limited to 'core/Command/Maintenance')
-rw-r--r--core/Command/Maintenance/Install.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php
index 4e84becf770..4b76a1f608c 100644
--- a/core/Command/Maintenance/Install.php
+++ b/core/Command/Maintenance/Install.php
@@ -31,9 +31,11 @@ use InvalidArgumentException;
use OC\Setup;
use OCP\IConfig;
use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Question\Question;
class Install extends Command {
@@ -138,24 +140,22 @@ class Install extends Command {
throw new InvalidArgumentException("Database name not provided.");
}
if (is_null($dbPass)) {
- /** @var $dialog \Symfony\Component\Console\Helper\DialogHelper */
- $dialog = $this->getHelperSet()->get('dialog');
- $dbPass = $dialog->askHiddenResponse(
- $output,
- "<question>What is the password to access the database with user <$dbUser>?</question>",
- false
- );
+ /** @var QuestionHelper $helper */
+ $helper = $this->getHelper('question');
+ $question = new Question('What is the password to access the database with user <'.$dbUser.'>?');
+ $question->setHidden(true);
+ $question->setHiddenFallback(false);
+ $dbPass = $helper->ask($input, $output, $question);
}
}
if (is_null($adminPassword)) {
- /** @var $dialog \Symfony\Component\Console\Helper\DialogHelper */
- $dialog = $this->getHelperSet()->get('dialog');
- $adminPassword = $dialog->askHiddenResponse(
- $output,
- "<question>What is the password you like to use for the admin account <$adminLogin>?</question>",
- false
- );
+ /** @var QuestionHelper $helper */
+ $helper = $this->getHelper('question');
+ $question = new Question('What is the password you like to use for the admin account <'.$adminLogin.'>?');
+ $question->setHidden(true);
+ $question->setHiddenFallback(false);
+ $adminPassword = $helper->ask($input, $output, $question);
}
$options = [