You are here

function spaces_init_context in Spaces 6

Same name and namespace in other branches
  1. 5.2 spaces.module \spaces_init_context()
  2. 5 spaces.module \spaces_init_context()
  3. 6.2 spaces.module \spaces_init_context()

Context prefix provider callback.

1 string reference to 'spaces_init_context'
spaces_purl_provider in ./spaces.module
Implementation of hook_purl_provider().

File

./spaces.module, line 47

Code

function spaces_init_context($type, $sid) {
  static $once;
  if (!isset($once)) {
    $once = FALSE;
  }
  if (!$once) {
    context_set('spaces', 'sid', $sid);
    $space = spaces_load($type, $sid, TRUE);
    spaces_set_space($space);
    $once = TRUE;
  }
}