domain_default

Definition

domain_default($reset = FALSE)
domain.module, line 444

Description

Assigns the default settings to domain 0, the root domain.

This value is used throughout the modules, so needed abstraction.

Parameters

$reset A boolean flag indicating whether to reset the static array or not.

Code

function domain_default($reset = FALSE) {
  static $default;
  if (empty($default) || $reset) {
    $default['domain_id'] = 0;
    $default['sitename'] = variable_get('domain_sitename', variable_get('sitename', 'Drupal'));
    $default['subdomain'] = variable_get('domain_root', '');
    $default['scheme'] = variable_get('domain_scheme', 'http');
    // Set the valid flag.
    $default['valid'] = TRUE;
    // Let submodules overwrite the defaults, if they wish.
    $default = domain_api($default);
  }
  return $default;
}