function oa_buttons_trigger_flag in Open Atrium Core 7.2
Helper function for flag and unflag hooks.
2 calls to oa_buttons_trigger_flag()
- oa_buttons_flag_flag in modules/
oa_buttons/ oa_buttons.module - Implements hook_flag_flag().
- oa_buttons_flag_unflag in modules/
oa_buttons/ oa_buttons.module - Implements hook_flag_unflag().
File
- modules/
oa_buttons/ oa_buttons.module, line 287
Code
function oa_buttons_trigger_flag($op, $flag, $content_id, $account) {
if ($flag->name == 'trash' && ($node = node_load($content_id)) && $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);
}
}