function og_submit_group in Organic groups 5.7
Same name and namespace in other branches
- 5.8 og.module \og_submit_group()
- 5 og.module \og_submit_group()
- 5.2 og.module \og_submit_group()
- 5.3 og.module \og_submit_group()
1 call to og_submit_group()
- og_nodeapi in ./
og.module - Implementation of hook_nodeapi().
File
- ./
og.module, line 1279
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;
}
elseif (!empty($node->og_groups_inaccessible)) {
// Add the inaccessible groups which did not show in Audience selector
$node->og_groups = (array) $node->og_groups + $node->og_groups_inaccessible;
}
// Change $node->theme to $node->og_theme so it matches how we node_load(). the node form uses $theme and not og_theme
// If author chose the default theme, then '' is written to the DB and group will follow any change made by site admin.
if (isset($node->theme)) {
$node->og_theme = $node->theme;
}
// 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);
}
}