domain_default

Versions
domain
domain_default($reset = FALSE)

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

This value is used throughout the modules. Even though this record is in the {domain} table, we use the value stored as a variable. Doing so prevents the module from firing when it has not been configured.

Parameters

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

▾ 13 functions call domain_default()

domain_check_primary in ./domain.module
Check to see if a redirect to the primary domain is needed.
domain_configure_form_submit in ./domain.admin.inc
Save any changes to the primary domain record.
domain_form_alter in ./domain.module
Implement hook_form_alter()
domain_invalid_domain_requested in ./domain.module
Redirect a request to an invalid domain.
domain_lookup in ./domain.module
Runs a lookup against the {domain} table. One of the two values must be present
domain_nav_menu in domain_nav/domain_nav.module
Implement hook_menu()
domain_prefix_configure_form in domain_prefix/domain_prefix.admin.inc
FormsAPI for generating the configuration form
domain_prefix_form in domain_prefix/domain_prefix.admin.inc
The table prefixing page for a domain.
domain_set_primary_domain in ./domain.module
Set the primary domain properly, if necessary.
domain_token_values in ./domain.module
Implement hook_token_values().
domain_user_user in domain_user/domain_user.module
Implement hook_user()
domain_warning_check in ./domain.module
Sets a message to the site admin.
hook_domain_source_path_alter in ./API.php
Allows modules to specify the target link for a Drupal path.

Code

./domain.module, line 677

<?php
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;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List