diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-08 05:08:21 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-08 05:08:21 +0000 |
commit | 2a83cc96dc9c2588c5f3ad02d73c59f2ab19c58b (patch) | |
tree | c6aee35e8c830125d9fe109c92ffab20ff31c6ac /lib/debug.lib.php | |
parent | 2799c89f58d389ac659c0bc414a86cb1454afd75 (diff) | |
download | ampache-2a83cc96dc9c2588c5f3ad02d73c59f2ab19c58b.tar.gz ampache-2a83cc96dc9c2588c5f3ad02d73c59f2ab19c58b.tar.bz2 ampache-2a83cc96dc9c2588c5f3ad02d73c59f2ab19c58b.zip |
more work for alpha2 release, clean up install and debug a bit
Diffstat (limited to 'lib/debug.lib.php')
-rw-r--r-- | lib/debug.lib.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/debug.lib.php b/lib/debug.lib.php index 74d6d3ee..30efc8a7 100644 --- a/lib/debug.lib.php +++ b/lib/debug.lib.php @@ -79,6 +79,11 @@ function check_php_ver($level=0) { if (floatval(phpversion()) < 5.1) { return false; } + + // Poor windows users if only their OS wasn't behind the times + if (strtoupper(substr(PHP_OS,0,3)) == 'WIN' AND floatval(phpversion()) < 5.3) { + return false; + } // Make sure that they have the sha256() algo installed if (!function_exists('hash_algos')) { return false; } @@ -228,6 +233,34 @@ function check_putenv() { } // check_putenv /** + * check_gettext + * This checks to see if you've got gettext installed + */ +function check_gettext() { + + if (!function_exists('gettext')) { + return false; + } + + return true; + +} // check_gettext + +/** + * check_mbstring + * This checks for mbstring support + */ +function check_mbstring() { + + if (!function_exists('mb_check_encoding')) { + return false; + } + + return true; + +} // check_mbstring + +/** * generate_config * This takes an array of results and re-generates the config file * this is used by the installer and by the admin/system page @@ -272,4 +305,20 @@ function generate_config($current) { } // generate_config +/** + * debug_ok + * Return an "OK" with the specified string + */ +function debug_result($comment,$status=false,$value=false) { + + $class = $status ? 'ok' : 'notok'; + if (!$value) { + $value = $status ? 'OK' : 'ERROR'; + } + + $final = '<span class="' . $class . '">' . scrub_out($value) . '</span> <em>' . scrub_out($comment) . '</em>'; + + return $final; + +} // debug_ok ?> |