You are here

function og_load_group in Organic groups 5.3

Same name and namespace in other branches
  1. 5.8 og.module \og_load_group()
  2. 5 og.module \og_load_group()
  3. 5.2 og.module \og_load_group()
  4. 5.7 og.module \og_load_group()
  5. 6.2 og.module \og_load_group()
  6. 6 og.module \og_load_group()
2 calls to og_load_group()
og_access_alter_nongroup_form in ./og_access.module
og_nodeapi in ./og.module
Implementation of hook_nodeapi().

File

./og.module, line 1306

Code

function og_load_group(&$node) {
  $sql = 'SELECT selective AS og_selective, description AS og_description, theme AS og_theme, register AS og_register, directory AS og_directory, language AS og_language, private AS og_private FROM {og} WHERE nid = %d';
  $result = db_query($sql, $node->nid);
  $node = (object) array_merge((array) $node, (array) db_fetch_array($result));
  $node->comment = COMMENT_NODE_DISABLED;

  // we don't use comments on og nodes. technically not needed since we set this on node submit
}