summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/class/dba.class.php24
-rw-r--r--lib/debug.lib.php23
-rw-r--r--templates/show_test.inc.php2
3 files changed, 25 insertions, 24 deletions
diff --git a/lib/class/dba.class.php b/lib/class/dba.class.php
index 03bf441c..ce87bab4 100644
--- a/lib/class/dba.class.php
+++ b/lib/class/dba.class.php
@@ -297,6 +297,30 @@ class Dba {
} // check_database
/**
+ * check_database_inserted
+ * checks to make sure that you have inserted the database
+ * and that the user you are using has access to it
+ */
+ public static function check_database_inserted() {
+
+ $sql = "DESCRIBE session";
+ $db_results = Dba::read($sql);
+
+ if (!$db_results) {
+ return false;
+ }
+
+ // Make sure the whole table is there
+ if (Dba::num_rows($db_results) != '7') {
+ return false;
+ }
+
+ return true;
+
+ } // check_database_inserted
+
+
+ /**
* show_profile
* This function is used for debug, helps with profiling
*/
diff --git a/lib/debug.lib.php b/lib/debug.lib.php
index 9b8b8e05..3eb3ca9e 100644
--- a/lib/debug.lib.php
+++ b/lib/debug.lib.php
@@ -31,29 +31,6 @@
*/
/**
- * 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::read($sql);
-
- if (!$db_results) {
- return false;
- }
-
- // Make sure the whole table is there
- if (Dba::num_rows($db_results) != '7') {
- return false;
- }
-
- return true;
-
-} // check_database_inserted
-
-/**
* check_php_ver
* checks the php version and makes
* sure that it's good enough
diff --git a/templates/show_test.inc.php b/templates/show_test.inc.php
index 1094f52f..ffb3c633 100644
--- a/templates/show_test.inc.php
+++ b/templates/show_test.inc.php
@@ -212,7 +212,7 @@
<td valign="top"><?php echo T_('Database tables'); ?></td>
<td valign="top">[
<?php
- $db_inserted = check_database_inserted($db,$results['local_db']);
+ $db_inserted = Dba::check_database_inserted();
if (!$db_inserted) {
echo debug_result('',false);
}