function spaces_router_get in Spaces 6
Same name and namespace in other branches
- 5.2 spaces.module \spaces_router_get()
- 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 1287
Code
function spaces_router_get($enabled = 1, $reset = FALSE) {
static $status;
if (!isset($status) || $reset) {
$status = $enabled;
}
return $status;
}