1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 18:29:40 +02:00

more work for alpha2 release, clean up install and debug a bit

This commit is contained in:
Karl 'vollmerk' Vollmer 2009-03-08 05:08:21 +00:00
parent 2799c89f58
commit 2a83cc96dc
11 changed files with 564 additions and 289 deletions

View file

@ -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; }
@ -227,6 +232,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
@ -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
?>