diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-04-01 16:44:50 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-04-01 16:44:51 +0200 |
commit | c61b68e8a62b64b1d177c0f58c4a28b4e7a67d1d (patch) | |
tree | 0ea4b1c5f96b8fa07c748bb0572b0041bc483a4a /src/Wallabag | |
parent | d92407041af37e0025a732ceaba378e10a5da04c (diff) | |
download | wallabag-c61b68e8a62b64b1d177c0f58c4a28b4e7a67d1d.tar.gz wallabag-c61b68e8a62b64b1d177c0f58c4a28b4e7a67d1d.tar.zst wallabag-c61b68e8a62b64b1d177c0f58c4a28b4e7a67d1d.zip |
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.
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Command/InstallCommand.php | 7 |
1 files changed, 4 insertions, 3 deletions
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 | |||
73 | 73 | ||
74 | $fulfilled = true; | 74 | $fulfilled = true; |
75 | 75 | ||
76 | $label = '<comment>PDO Drivers</comment>'; | 76 | $label = '<comment>PDO Driver</comment>'; |
77 | $status = '<info>OK!</info>'; | 77 | $status = '<info>OK!</info>'; |
78 | $help = ''; | 78 | $help = ''; |
79 | if (!(extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql'))) { | 79 | |
80 | if (!extension_loaded($this->getContainer()->getParameter('database_driver'))) { | ||
80 | $fulfilled = false; | 81 | $fulfilled = false; |
81 | $status = '<error>ERROR!</error>'; | 82 | $status = '<error>ERROR!</error>'; |
82 | $help = 'Needs one of sqlite, mysql or pgsql PDO drivers'; | 83 | $help = 'Database driver "'.$this->getContainer()->getParameter('database_driver').'" is not installed.'; |
83 | } | 84 | } |
84 | 85 | ||
85 | $rows = []; | 86 | $rows = []; |