You are here

function db_is_active in Drupal 6

Returns a boolean depending on the availability of the database.

Related topics

4 calls to db_is_active()
drupal_get_filename in includes/bootstrap.inc
Returns and optionally sets the filename for a system item (module, theme, etc.). The filename, whether provided, cached, or retrieved from the database, is only returned if the file exists.
list_themes in includes/theme.inc
Provides a list of currently available themes.
template_preprocess in includes/theme.inc
Adds a default set of helper variables for preprocess functions and templates. This comes in before any other preprocess function which makes it possible to be used in default theme implementations (non-overriden theme functions).
_drupal_maintenance_theme in includes/theme.maintenance.inc
Sets up the theming system for site installs, updates and when the site is in off-line mode. It also applies when the database is unavailable.

File

includes/database.inc, line 194
Wrapper for database interface code.

Code

function db_is_active() {
  global $active_db;
  return !empty($active_db);
}