You are here

function domain_reset_domain in Domain Access 7.3

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

Reset the active domain to its initial version.

If $bootstrap is set to TRUE, this function will re-bootstrap Domain Access to restore variables and other settings that may have changed during request execution.

If domain_set_domain() invoked TRUE, then this matching function should as well. Otherwise, pass FALSE or empty.

Parameters

$bootstrap: Boolean flag that indicates whether to run domain bootstrap load.

Return value

No return value. The global $_domain value is altered, and domain-specific data functions are loaded.

See also

domain_initial_domain()

domain_set_domain()

5 calls to domain_reset_domain()
DomainCacheTest::testDomainPageCache in tests/domain.test
DomainHookTest::testDomainHooks in tests/domain.test
DomainSwitchingTest::testDomainSwitching in tests/domain.test
domain_content_view in domain_content/domain_content.admin.inc
Content administration for a specific domain.
domain_cron in ./domain.module
Implements hook_cron().

File

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

Code

function domain_reset_domain($bootstrap = FALSE) {
  $domain = domain_initial_domain();
  if (!empty($domain)) {
    domain_set_domain($domain['domain_id'], $bootstrap);
  }
}