diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-02-03 11:27:54 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-02-03 11:27:54 -0500 |
commit | d8e9d73608b8c98776b02fadd94aab314d5abb4f (patch) | |
tree | 80ea4e855e0e5ef69ed32dd49518126f6cbb7386 | |
parent | dd70337451390b260e95f998c8b79b9fefbf3b3a (diff) | |
download | ampache-d8e9d73608b8c98776b02fadd94aab314d5abb4f.tar.gz ampache-d8e9d73608b8c98776b02fadd94aab314d5abb4f.tar.bz2 ampache-d8e9d73608b8c98776b02fadd94aab314d5abb4f.zip |
Split the PDO check in two
It's more helpful this way.
-rw-r--r-- | lib/debug.lib.php | 10 | ||||
-rw-r--r-- | 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 @@ </td> </tr> <tr> - <td valign="top"><?php echo T_('Hash extension'); ?></td> + <td valign="top"><?php echo T_('PHP hash extension'); ?></td> <td valign="top"> <?php echo debug_result(check_php_hash()); ?> </td> @@ -39,7 +39,7 @@ </td> </tr> <tr> - <td valign="top"><?php echo T_('SHA256 Hash'); ?></td> + <td valign="top"><?php echo T_('SHA256'); ?></td> <td valign="top"> <?php echo debug_result(check_php_hash_algo()); ?> </td> @@ -48,12 +48,21 @@ </td> </tr> <tr> - <td valign="top"><?php echo T_('PHP PDO'); ?></td> + <td valign="top"><?php echo T_('PHP PDO extension'); ?></td> <td valign="top"> <?php echo debug_result(check_php_pdo()); ?> </td> <td> - <?php echo T_('This tests whether the PDO extension and the MySQL driver for PDO are installed. These are required by Ampache.'); ?> + <?php echo T_('This tests whether you have the PDO extension enabled. This extension is required by Ampache.'); ?> + </td> +</tr> +<tr> + <td valign="top"><?php echo T_('MySQL'); ?></td> + <td valign="top"> + <?php echo debug_result(check_php_pdo_mysql()); ?> + </td> + <td> + <?php echo T_('This tests whether the MySQL driver for PDO is enabled. This driver is required by Ampache.'); ?> </td> </tr> <tr> @@ -75,7 +84,7 @@ </td> </tr> <tr> - <td valign="top"><?php echo T_('JSON extension'); ?></td> + <td valign="top"><?php echo T_('PHP JSON extension'); ?></td> <td valign="top"> <?php echo debug_result(check_php_json()); ?> </td> |