function flag_actions_insert_action in Flag 6.2
Same name and namespace in other branches
- 5 flag_actions.module \flag_actions_insert_action()
- 6 flag_actions.module \flag_actions_insert_action()
- 7.3 flag_actions.module \flag_actions_insert_action()
- 7.2 flag_actions.module \flag_actions_insert_action()
Insert a new flag action.
Parameters
$fid: The flag object ID.
$event: The flag event, such as "flag" or "unflag".
$threshold: The flagging threshold at which this action will be executed.
$repeat_threshold: The number of additional flaggings after which the action will be repeated.
$callback: The action callback to be executed.
$parameters: The action parameters.
1 call to flag_actions_insert_action()
- flag_actions_form_submit in ./
flag_actions.module - Generic submit handler for saving flag actions.
File
- ./
flag_actions.module, line 139 - Actions support for the Flag module.
Code
function flag_actions_insert_action($fid, $event, $threshold, $repeat_threshold, $callback, $parameters) {
db_query("INSERT INTO {flag_actions} (fid, event, threshold, repeat_threshold, callback, parameters) VALUES (%d, '%s', %d, %d, '%s', '%s')", $fid, $event, $threshold, $repeat_threshold, $callback, serialize($parameters));
return db_last_insert_id('flag_actions', 'aid');
}