aboutsummaryrefslogtreecommitdiffhomepage
path: root/install/install_functions.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-02-10 00:32:38 +0100
committerThomas Citharel <tcit@tcit.fr>2015-02-10 00:32:38 +0100
commit8d7ec54658cfe94cd7cab0f5979afcec962188f5 (patch)
tree2b07d17f888d902df00da8b7c64440a485d76e52 /install/install_functions.php
parentb65d65be3121f29009c5dd985f4d2662e4f20c52 (diff)
downloadwallabag-8d7ec54658cfe94cd7cab0f5979afcec962188f5.tar.gz
wallabag-8d7ec54658cfe94cd7cab0f5979afcec962188f5.tar.zst
wallabag-8d7ec54658cfe94cd7cab0f5979afcec962188f5.zip
improvements for the installer
Diffstat (limited to 'install/install_functions.php')
-rw-r--r--install/install_functions.php22
1 files changed, 20 insertions, 2 deletions
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');
26$filter_ok = extension_loaded('filter'); 26$filter_ok = extension_loaded('filter');
27$gettext_ok = function_exists("gettext"); 27$gettext_ok = function_exists("gettext");
28$gd_ok = extension_loaded('gd'); 28$gd_ok = extension_loaded('gd');
29$pdo_drivers_passing = extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql'); 29$pdo_drivers = pdoDrivers();
30$pdo_drivers_passing = $pdo_drivers['sqlite'] || $pdo_drivers['mysql'] || $pdo_drivers['postgres'];
31
32
30 33
31if (extension_loaded('xmlreader')) { 34if (extension_loaded('xmlreader')) {
32 $xml_ok = true; 35 $xml_ok = true;
@@ -39,7 +42,11 @@ if (extension_loaded('xmlreader')) {
39 $xml_ok = false; 42 $xml_ok = false;
40} 43}
41 44
42$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); 45$status = array('app_name' => $app_name, 'php' => $php_ok, 'pdo' => $pdo_ok,
46 'pdo_drivers_passing' => $pdo_drivers_passing, 'xml' => $xml_ok, 'pcre' => $pcre_ok,
47 'zlib' => $zlib_ok, 'mbstring' => $mbstring_ok, 'dom' => $dom_ok, 'iconv' => $iconv_ok, 'tidy' => $tidy_ok, 'curl' => $curl_ok,
48 'parse_ini' => $parse_ini_ok, 'parallel' => $parallel_ok, 'allow_url_fopen' => $allow_url_fopen_ok, 'filter' => $filter_ok,
49 'gettext' => $gettext_ok, 'gd' => $gd_ok);
43 50
44return $status; 51return $status;
45} 52}
@@ -53,6 +60,17 @@ function isPassing() {
53 return !in_array(false, $status); 60 return !in_array(false, $status);
54} 61}
55 62
63function pdoDrivers() {
64 $pdo_driver_sqlite = extension_loaded('pdo_sqlite');
65 $pdo_driver_mysql = extension_loaded('pdo_mysql');
66 $pdo_driver_postgres = extension_loaded('pdo_pgsql');
67
68 $pdo_drivers = array('sqlite' => $pdo_driver_sqlite, 'mysql' => $pdo_driver_mysql,
69 'postgres' => $pdo_driver_postgres);
70
71 return $pdo_drivers;
72}
73
56/* Function taken from at http://php.net/manual/en/function.rmdir.php#110489 74/* Function taken from at http://php.net/manual/en/function.rmdir.php#110489
57 * Idea : nbari at dalmp dot com 75 * Idea : nbari at dalmp dot com
58 * Rights unknown 76 * Rights unknown