diff options
Diffstat (limited to 'includes/database.inc')
-rw-r--r-- | includes/database.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/database.inc b/includes/database.inc index 63536e036..917fbb830 100644 --- a/includes/database.inc +++ b/includes/database.inc @@ -164,6 +164,14 @@ function db_set_active($name = 'default') { } /** + * Returns a boolean depending on the availability of the database. + */ +function db_is_active() { + global $active_db; + return !empty($active_db); +} + +/** * Helper function for db_query(). */ function _db_query_callback($match, $init = FALSE) { |