From c61b68e8a62b64b1d177c0f58c4a28b4e7a67d1d Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 1 Apr 2016 16:44:50 +0200 Subject: Check selected PDO driver on install Instead of checking that one of the DB driver is installed we retrieve the selected driver (in parameters) and see if the extension exists. --- src/Wallabag/CoreBundle/Command/InstallCommand.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 7c3d1c52..6665f4b5 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -73,13 +73,14 @@ class InstallCommand extends ContainerAwareCommand $fulfilled = true; - $label = 'PDO Drivers'; + $label = 'PDO Driver'; $status = 'OK!'; $help = ''; - if (!(extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql'))) { + + if (!extension_loaded($this->getContainer()->getParameter('database_driver'))) { $fulfilled = false; $status = 'ERROR!'; - $help = 'Needs one of sqlite, mysql or pgsql PDO drivers'; + $help = 'Database driver "'.$this->getContainer()->getParameter('database_driver').'" is not installed.'; } $rows = []; -- cgit v1.2.3