You are here

function _domain_conf_load_primary in Domain Access 7.3

Same name and namespace in other branches
  1. 6.2 domain_conf/domain_conf.module \_domain_conf_load_primary()
  2. 7.2 domain_conf/domain_conf.module \_domain_conf_load_primary()

Load the variables from the primary domain.

We run this special handler when not able to trust variable_get() during domain switching.

Parameters

$unset: If TRUE, this will reset the global $conf array.

Return value

If set to TRUE, no return, just modify the global $conf array. Otherwise, return the settings data for the primary domain.

See also

domain_set_domain()

2 calls to _domain_conf_load_primary()
domain_conf_domain_bootstrap_full in domain_conf/domain_conf.module
Implements hook_domain_bootstrap_full().
domain_conf_variable_get in domain_conf/domain_conf.module
Load a variable specific to a domain.

File

domain_conf/domain_conf.module, line 420
Domain manager configuration options.

Code

function _domain_conf_load_primary($unset = FALSE) {
  $settings =& drupal_static(__FUNCTION__);
  if (!isset($settings)) {
    $settings = variable_initialize(array());
  }

  // Do we reset the global or just return data?
  if ($unset) {
    global $conf;
    $conf = $settings;
    return;
  }
  return $settings;
}