1 bootstrap.inc _backdrop_bootstrap_variables()

Loads system variables and all enabled bootstrap modules.


core/includes/bootstrap.inc, line 3200
Functions that need to be loaded on every Backdrop request.


function _backdrop_bootstrap_variables() {
  global $conf;

  // Populate global settings for this test if set. Because state_get() has
  // overhead of locking/unlocking, we use the simpler tempstore_get() function
  // when needing to populate settings in tests.
  if ($test_prefix = backdrop_valid_test_ua() && db_table_exists('tempstore')) {
    include_once BACKDROP_ROOT . '/core/includes/common.inc';
    if ($settings = tempstore_get('simpletest', 'settings')) {
      $GLOBALS['settings'] = array_merge($GLOBALS['settings'], $settings);

  // Load variables from the database, but do not overwrite variables set in settings.php.
  $conf = variable_initialize(isset($conf) ? $conf : array());