From d8e9d73608b8c98776b02fadd94aab314d5abb4f Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Sun, 3 Feb 2013 11:27:54 -0500 Subject: Split the PDO check in two It's more helpful this way. --- lib/debug.lib.php | 10 ++++++---- templates/show_test_table.inc.php | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lib/debug.lib.php b/lib/debug.lib.php index 7ce061f6..e254828a 100644 --- a/lib/debug.lib.php +++ b/lib/debug.lib.php @@ -26,6 +26,7 @@ function check_php() { check_php_hash() && check_php_hash_algo() && check_php_pdo() && + check_php_pdo_mysql() && check_php_session() && check_php_json() && check_php_safemode() @@ -60,10 +61,11 @@ function check_php_session() { } function check_php_pdo() { - if (class_exists('PDO') && in_array('mysql', PDO::getAvailableDrivers())) { - return true; - } - return false; + return class_exists('PDO'); +} + +function check_php_pdo_mysql() { + return class_exists('PDO') ? in_array('mysql', PDO::getAvailableDrivers()) : false; } /** diff --git a/templates/show_test_table.inc.php b/templates/show_test_table.inc.php index f48bc429..7816a41e 100644 --- a/templates/show_test_table.inc.php +++ b/templates/show_test_table.inc.php @@ -30,7 +30,7 @@ - + @@ -39,7 +39,7 @@ - + @@ -48,12 +48,21 @@ - + - + + + + + + + + + + @@ -75,7 +84,7 @@ - + -- cgit