You are here

function og_submit_group in Organic groups 5.2

Same name and namespace in other branches
  1. 5.8 og.module \og_submit_group()
  2. 5 og.module \og_submit_group()
  3. 5.3 og.module \og_submit_group()
  4. 5.7 og.module \og_submit_group()
1 call to og_submit_group()
og_nodeapi in ./og.module
Implementation of hook_nodeapi().

File

./og.module, line 1219

Code

function og_submit_group(&$node) {

  // comments are not allowed on group nodes, since we don't have any nice way to present them
  if (og_is_group_type($node->type)) {
    $node->comment = COMMENT_NODE_DISABLED;
  }

  // Reset to follow site default theme if user selects the site default
  if ($node->og_theme == variable_get('theme_default', 'bluemarine')) {
    $node->og_theme = NULL;
  }

  // Normalize og_groups array
  if (is_array($node->og_groups)) {
    $node->og_groups = array_filter($node->og_groups);
    $node->og_groups = array_keys($node->og_groups);
  }
}