summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/class/database.class.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/class/database.class.php b/app/class/database.class.php
index 74587f5..cdfdfce 100644
--- a/app/class/database.class.php
+++ b/app/class/database.class.php
@@ -98,6 +98,23 @@ abstract class database
{
return self::getInstance()->_esc($str);
}
+
+ /*
+ * Check whether Scrott's database config is loaded
+ */
+ public static function checkConfig() : bool
+ {
+ try
+ {
+ $db = self::getInstance();
+ }
+ catch (Exception $e)
+ {
+ return false;
+ }
+
+ return true;
+ }
}
?>