diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-06-21 07:33:35 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-06-21 07:33:35 +0000 |
commit | 71f0c05034660f97f92b07f3c39295c861427a47 (patch) | |
tree | 82ef87b76013995d1c9e882f01799d4eb8cef068 /lib/debug.lib.php | |
parent | 42f1115c2ed920d9624f73b64d9c5e1c0df675b2 (diff) | |
download | ampache-71f0c05034660f97f92b07f3c39295c861427a47.tar.gz ampache-71f0c05034660f97f92b07f3c39295c861427a47.tar.bz2 ampache-71f0c05034660f97f92b07f3c39295c861427a47.zip |
fixed the debug page
Diffstat (limited to 'lib/debug.lib.php')
-rw-r--r-- | lib/debug.lib.php | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/lib/debug.lib.php b/lib/debug.lib.php index 9f7f1c59..b2969815 100644 --- a/lib/debug.lib.php +++ b/lib/debug.lib.php @@ -47,22 +47,21 @@ function check_database($host,$username,$pass) { } // check_database -/*! - @function check_database_inserted - @discussion checks to make sure that you - have inserted the database and that the user - you are using has access to it -*/ +/** + * check_database_inserted + * checks to make sure that you have inserted the database + * and that the user you are using has access to it + */ function check_database_inserted($dbh,$db_name) { + $sql = "DESCRIBE session"; + $db_results = Dba::query($sql); - if (!@mysql_select_db($db_name,$dbh)) { - return false; - } + if (!$db_results) { + return false; + } - $sql = "DESCRIBE session"; - $db_results = @mysql_query($sql, $dbh); - if (!@mysql_num_rows($db_results)) { + if (!Dba::num_rows($db_results)) { return false; } @@ -70,11 +69,11 @@ function check_database_inserted($dbh,$db_name) { } // check_database_inserted -/*! - @function check_php_ver - @discussion checks the php version and makes - sure that it's good enough -*/ +/** + * check_php_ver + * checks the php version and makes + * sure that it's good enough + */ function check_php_ver($level=0) { if (strcmp('5.0.0',phpversion()) > 0) { @@ -85,10 +84,10 @@ function check_php_ver($level=0) { } // check_php_ver -/*! - @function check_php_mysql - @discussion checks for mysql support -*/ +/** + * check_php_mysql + * checks for mysql support by looking for the mysql_query function + */ function check_php_mysql() { if (!function_exists('mysql_query')) { @@ -99,10 +98,10 @@ function check_php_mysql() { } // check_php_mysql -/*! - @function check_php_session - @discussion checks to make sure the needed functions - for sessions exist +/** + * check_php_session + * checks to make sure the needed functions + * for sessions exist */ function check_php_session() { @@ -114,10 +113,10 @@ function check_php_session() { } // check_php_session -/*! - @function check_php_iconv - @discussion checks to see if you have iconv installed -*/ +/** + * check_php_iconv + * checks to see if you have iconv installed + */ function check_php_iconv() { if (!function_exists('iconv')) { |