function flag_abuse_form_flag_confirm_alter in Flag Abuse 6.2
Implementation of hook_form_FORM_ID_alter().
File
- ./
flag_abuse.module, line 96
Code
function flag_abuse_form_flag_confirm_alter(&$form, &$form_state) {
global $user;
// Permmission check instead of a role.
if (user_access('reset abuse flags', $account)) {
$flag_name = $form['flag_name']['#value'];
// Is this one of our abuse flags?
if (in_array($flag_name, array(
'abuse_node',
'abuse_comment',
'abuse_user',
))) {
drupal_set_title(t('Flag reset'));
$form['description']['#value'] = t('Are you sure you want to reset all offensive flag on this content? Once doing so, users will not be able to flag this content again.');
$form['actions']['submit']['#value'] = t('Reset flags');
}
}
}