From 8d7ec54658cfe94cd7cab0f5979afcec962188f5 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 10 Feb 2015 00:32:38 +0100 Subject: [PATCH] improvements for the installer --- install/index.php | 92 +++++++++++++++++------------------ install/install_functions.php | 22 ++++++++- 2 files changed, 65 insertions(+), 49 deletions(-) diff --git a/install/index.php b/install/index.php index 30bc2f6b..1f11413a 100755 --- a/install/index.php +++ b/install/index.php @@ -296,7 +296,7 @@ cursor: pointer; } .compatibity_result { margin: auto; - max-width: 300px; + max-width: 350px; min-height: 50px; line-height: 50px; text-align: center; @@ -386,10 +386,10 @@ border: 1px solid #000;
All good
-
Some problems, but it's OK !
+
Some warnings, but the minimum is here !
Bad news : you can't run wallabag
- +
@@ -569,38 +569,54 @@ php composer.phar install

Database engine:

+ - + + +
+

You have to enable pdo_pgsql extension to use PostgreSQL.

+
+ +

@@ -672,17 +688,6 @@ php composer.phar install endif; ?> - - $("#install_button").hide(); - - $("#pdo_sqlite").hide(); - - $("#mysql_utf8_mb4").click(function() { $("#utf8_mb4_infos").toggle(); }); @@ -720,13 +725,6 @@ php composer.phar install $("#sqlite_description").show(); $("#mysql_description").hide(); $("#postgres_description").hide(); - - $("#pdo_sqlite").show(); - $("#install_button").hide(); - } } }); diff --git a/install/install_functions.php b/install/install_functions.php index 3b465851..4a18d7d8 100644 --- a/install/install_functions.php +++ b/install/install_functions.php @@ -26,7 +26,10 @@ $allow_url_fopen_ok = (bool)ini_get('allow_url_fopen'); $filter_ok = extension_loaded('filter'); $gettext_ok = function_exists("gettext"); $gd_ok = extension_loaded('gd'); -$pdo_drivers_passing = extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql'); +$pdo_drivers = pdoDrivers(); +$pdo_drivers_passing = $pdo_drivers['sqlite'] || $pdo_drivers['mysql'] || $pdo_drivers['postgres']; + + if (extension_loaded('xmlreader')) { $xml_ok = true; @@ -39,7 +42,11 @@ if (extension_loaded('xmlreader')) { $xml_ok = false; } -$status = array('app_name' => $app_name, 'php' => $php_ok, 'pdo' => $pdo_ok, 'pdo_drivers_passing' => $pdo_drivers_passing, 'xml' => $xml_ok, 'pcre' => $pcre_ok, 'zlib' => $zlib_ok, 'mbstring' => $mbstring_ok, 'dom' => $dom_ok, 'iconv' => $iconv_ok, 'tidy' => $tidy_ok, 'curl' => $curl_ok, 'parse_ini' => $parse_ini_ok, 'parallel' => $parallel_ok, 'allow_url_fopen' => $allow_url_fopen_ok, 'filter' => $filter_ok, 'gettext' => $gettext_ok, 'gd' => $gd_ok); +$status = array('app_name' => $app_name, 'php' => $php_ok, 'pdo' => $pdo_ok, + 'pdo_drivers_passing' => $pdo_drivers_passing, 'xml' => $xml_ok, 'pcre' => $pcre_ok, + 'zlib' => $zlib_ok, 'mbstring' => $mbstring_ok, 'dom' => $dom_ok, 'iconv' => $iconv_ok, 'tidy' => $tidy_ok, 'curl' => $curl_ok, + 'parse_ini' => $parse_ini_ok, 'parallel' => $parallel_ok, 'allow_url_fopen' => $allow_url_fopen_ok, 'filter' => $filter_ok, + 'gettext' => $gettext_ok, 'gd' => $gd_ok); return $status; } @@ -53,6 +60,17 @@ function isPassing() { return !in_array(false, $status); } +function pdoDrivers() { + $pdo_driver_sqlite = extension_loaded('pdo_sqlite'); + $pdo_driver_mysql = extension_loaded('pdo_mysql'); + $pdo_driver_postgres = extension_loaded('pdo_pgsql'); + + $pdo_drivers = array('sqlite' => $pdo_driver_sqlite, 'mysql' => $pdo_driver_mysql, + 'postgres' => $pdo_driver_postgres); + + return $pdo_drivers; +} + /* Function taken from at http://php.net/manual/en/function.rmdir.php#110489 * Idea : nbari at dalmp dot com * Rights unknown -- 2.41.0