function og_update_group in Organic groups 6
Same name and namespace in other branches
- 5.8 og.module \og_update_group()
- 5 og.module \og_update_group()
- 5.2 og.module \og_update_group()
- 5.3 og.module \og_update_group()
- 5.7 og.module \og_update_group()
- 6.2 og.module \og_update_group()
1 call to og_update_group()
- og_nodeapi in ./
og.module - Implementation of hook_nodeapi().
File
- ./
og.module, line 1550
Code
function og_update_group($node) {
// If an existing node becomes a group, then a row may not be present in {og} table.
$sql = "SELECT nid FROM {og} WHERE nid = %d";
if (db_result(db_query($sql, $node->nid))) {
drupal_write_record('og', $node, array(
'nid',
));
}
else {
og_insert_group($node);
}
}