X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommand.php;h=c9dad0df71eff039030eb6aea08ac663ec1325f6;hb=f39e94ace35c2a30e2079706bb3d27d8a16c91ec;hp=84bd51fa220060a65088ebbf7a699c493cc8a9a7;hpb=d7cc16c8b585f6a600cd309a9bb5630794fcf9aa;p=github%2Fwallabag%2Fwallabag.git
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 84bd51fa..c9dad0df 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -26,6 +26,14 @@ class InstallCommand extends ContainerAwareCommand
*/
protected $defaultOutput;
+ /**
+ * @var array
+ */
+ protected $functionExists = [
+ 'curl_exec',
+ 'curl_multi_init',
+ ];
+
protected function configure()
{
$this
@@ -65,27 +73,32 @@ class InstallCommand extends ContainerAwareCommand
$fulfilled = true;
- $label = 'PCRE';
- if (extension_loaded('pcre')) {
+ $label = 'PDO Drivers';
+ if (extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql')) {
$status = 'OK!';
$help = '';
} else {
$fulfilled = false;
$status = 'ERROR!';
- $help = 'You should enabled PCRE extension';
+ $help = 'Needs one of sqlite, mysql or pgsql PDO drivers';
}
+
$rows[] = array($label, $status, $help);
- $label = 'DOM';
- if (extension_loaded('DOM')) {
- $status = 'OK!';
- $help = '';
- } else {
- $fulfilled = false;
- $status = 'ERROR!';
- $help = 'You should enabled DOM extension';
+ foreach ($this->functionExists as $functionRequired) {
+ $label = ''.$functionRequired.'';
+
+ if (function_exists($functionRequired)) {
+ $status = 'OK!';
+ $help = '';
+ } else {
+ $fulfilled = false;
+ $status = 'ERROR!';
+ $help = 'You need the '.$functionRequired.' function activated';
+ }
+
+ $rows[] = array($label, $status, $help);
}
- $rows[] = array($label, $status, $help);
$table = new Table($this->defaultOutput);
$table
@@ -180,7 +193,7 @@ class InstallCommand extends ContainerAwareCommand
$this->defaultOutput->writeln('Step 3 of 4. Administration setup.');
$questionHelper = $this->getHelperSet()->get('question');
- $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (y/N)', true);
+ $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true);
if (!$questionHelper->ask($this->defaultInput, $this->defaultOutput, $question)) {
return $this;
@@ -209,6 +222,7 @@ class InstallCommand extends ContainerAwareCommand
$config->setTheme($this->getContainer()->getParameter('wallabag_core.theme'));
$config->setItemsPerPage($this->getContainer()->getParameter('wallabag_core.items_on_page'));
$config->setRssLimit($this->getContainer()->getParameter('wallabag_core.rss_limit'));
+ $config->setReadingSpeed($this->getContainer()->getParameter('wallabag_core.reading_speed'));
$config->setLanguage($this->getContainer()->getParameter('wallabag_core.language'));
$em->persist($config);