You are here

protected function spaces_controller_context::load_space_values in Spaces 6.3

Same name and namespace in other branches
  1. 7.3 plugins/spaces_controller_context.inc \spaces_controller_context::load_space_values()
  2. 7 plugins/spaces_controller_context.inc \spaces_controller_context::load_space_values()

Override of load_space_values().

All overrides are retrieved at once for a given space to reduce the number of queries run when a space is active.

Overrides spaces_controller::load_space_values

File

plugins/spaces_controller_context.inc, line 45

Class

spaces_controller_context
Context controller.

Code

protected function load_space_values($id = NULL) {
  if (!$this->loaded_all['space']) {
    $result = db_query("\n        SELECT object_id AS id, value\n        FROM {spaces_overrides}\n        WHERE type = '%s'\n          AND id = '%s'\n          AND object_type = '%s'", $this->space_type, $this->space_id, $this->controller);
    while ($row = db_fetch_object($result)) {
      $this->values['space'][$row->id] = unserialize($row->value);
    }
    $this->loaded_all['space'] = TRUE;
  }
}