function flag_confirm_submit in Flag 6
Same name and namespace in other branches
- 5 flag.module \flag_confirm_submit()
- 6.2 flag.module \flag_confirm_submit()
- 7.3 includes/flag.pages.inc \flag_confirm_submit()
- 7.2 flag.module \flag_confirm_submit()
File
- ./
flag.module, line 527
Code
function flag_confirm_submit(&$form, &$form_state) {
$action = $form_state['values']['action'];
$flag_name = $form_state['values']['flag_name'];
$content_id = $form_state['values']['content_id'];
$result = flag($action, $flag_name, $content_id);
if (!$result) {
drupal_set_message(t('You are not allowed to flag, or unflag, this content.'));
}
else {
$flag = flag_get_flag($flag_name);
drupal_set_message($flag
->get_label($action . '_message', $content_id));
}
}