function oa_buttons_node_update in Open Atrium Core 7.2
Implements hook_node_update().
File
- modules/
oa_buttons/ oa_buttons.module, line 260
Code
function oa_buttons_node_update($node) {
if ($node->type == OA_SPACE_TYPE) {
oa_buttons_clear_section_button_cache($node->nid);
}
elseif ($node->type == OA_SECTION_TYPE) {
$gid = !empty($node->{OG_AUDIENCE_FIELD}[LANGUAGE_NONE][0]['target_id']) ? $node->{OG_AUDIENCE_FIELD}[LANGUAGE_NONE][0]['target_id'] : OA_BUTTONS_CLEAR_CACHE_ALL;
oa_buttons_clear_section_button_cache($gid);
}
}