function _oa_sections_batch_change_space_operation in Open Atrium Core 7.2
Batch operation that changes a node's Space.
Parameters
int $nid: The NID of the node to update.
int $space_nid: The NID of the Space the node will belong to after changed.
1 call to _oa_sections_batch_change_space_operation()
- oa_sections_node_update in modules/
oa_sections/ oa_sections.module - Implements hook_node_update().
1 string reference to '_oa_sections_batch_change_space_operation'
- oa_sections_node_update in modules/
oa_sections/ oa_sections.module - Implements hook_node_update().
File
- modules/
oa_sections/ oa_sections.module, line 88
Code
function _oa_sections_batch_change_space_operation($nid, $space_nid) {
$node = node_load($nid);
$node->og_group_ref[LANGUAGE_NONE][0]['target_id'] = $space_nid;
node_save($node);
}