You are here

function spaces_router_get in Spaces 5.2

Same name and namespace in other branches
  1. 6 spaces.module \spaces_router_get()
  2. 6.2 spaces.module \spaces_router_get()

Sets a static variable that is used to disable spaces routing altogether -- e.g. for install/update scripts, migrations, etc.

Parameters

$enabled: Optional boolean for enabling/disabling spaces routing.

$reset: Optional boolean for resetting the static cache.

Return value

Returns a boolean for whether routing is enabled/disabled.

2 calls to spaces_router_get()
spaces_router in ./spaces.module
Wrapper around implementations of $space->router. Provides additional intelligence, including a global killswitch and routing when no spaces are active.
spaces_router_set in ./spaces.module
Wrapper around spaces_router_get().

File

./spaces.module, line 922

Code

function spaces_router_get($enabled = 1, $reset = FALSE) {
  static $status;
  if (!isset($status) || $reset) {
    $status = $enabled;
  }
  return $status;
}