]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Command/InstallCommand.php
Fix internal settings
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Command / InstallCommand.php
index 2d73a9add8cafc66412a6da9ad1b2c61c4e62b69..c5a5a519ceb3dd5f0df69d1a98eaeacad6a20778 100644 (file)
@@ -73,14 +73,14 @@ class InstallCommand extends ContainerAwareCommand
 
         $fulfilled = true;
 
-        $label = '<comment>PDO Drivers</comment>';
-        if (extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql')) {
-            $status = '<info>OK!</info>';
-            $help = '';
-        } else {
+        $label = '<comment>PDO Driver</comment>';
+        $status = '<info>OK!</info>';
+        $help = '';
+
+        if (!extension_loaded($this->getContainer()->getParameter('database_driver'))) {
             $fulfilled = false;
             $status = '<error>ERROR!</error>';
-            $help = 'Needs one of sqlite, mysql or pgsql PDO drivers';
+            $help = 'Database driver "'.$this->getContainer()->getParameter('database_driver').'" is not installed.';
         }
 
         $rows = [];
@@ -88,11 +88,10 @@ class InstallCommand extends ContainerAwareCommand
 
         foreach ($this->functionExists as $functionRequired) {
             $label = '<comment>'.$functionRequired.'</comment>';
+            $status = '<info>OK!</info>';
+            $help = '';
 
-            if (function_exists($functionRequired)) {
-                $status = '<info>OK!</info>';
-                $help = '';
-            } else {
+            if (!function_exists($functionRequired)) {
                 $fulfilled = false;
                 $status = '<error>ERROR!</error>';
                 $help = 'You need the '.$functionRequired.' function activated';
@@ -232,11 +231,6 @@ class InstallCommand extends ContainerAwareCommand
         $em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute();
 
         $settings = [
-            [
-                'name' => 'download_pictures',
-                'value' => '1',
-                'section' => 'entry',
-            ],
             [
                 'name' => 'carrot',
                 'value' => '1',