function db_is_active

6.x database.inc db_is_active()

Returns a boolean depending on the availability of the database.

Related topics

4 calls to db_is_active()
drupal_get_filename in drupal-6.x/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 drupal-6.x/includes/theme.inc
Provides a list of currently available themes.
template_preprocess in drupal-6.x/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 drupal-6.x/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.
2 string references to 'db_is_active'
template_preprocess in drupal-6.x/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).
template_preprocess_maintenance_page in drupal-6.x/includes/theme.maintenance.inc
The variables generated here is a mirror of template_preprocess_page(). This preprocessor will run it's course when theme_maintenance_page() is invoked. It is also used in theme_install_page() and theme_update_page() to keep all the variables…

File

drupal-6.x/includes/database.inc, line 194
Wrapper for database interface code.

Code

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