You are here

function domain_default in Domain Access 5

Same name and namespace in other branches
  1. 6.2 domain.module \domain_default()
  2. 7.3 domain.module \domain_default()
  3. 7.2 domain.module \domain_default()

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.

13 calls to domain_default()
domain_batch in ./domain_admin.inc
Allows for the batch update of certain elements.
domain_delete_form_submit in ./domain_admin.inc
FormsAPI for domain_delete_form()
domain_domains in ./domain.module
Return all active domains (including the default) as an array.
domain_edit in ./domain_admin.inc
Edit an existing domain record
domain_form_alter in ./domain.module
Implement hook_form_alter()

... See full list

File

./domain.module, line 471
Core module functions for the Domain Access suite.

Code

function domain_default($reset = FALSE) {
  static $default;
  if (empty($default) || $reset) {
    $default['domain_id'] = 0;
    $default['sitename'] = variable_get('domain_sitename', variable_get('site_name', '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;
}