You are here

function advpoll_clear_votes_confirm_form_submit in Advanced Poll 7.3

Same name and namespace in other branches
  1. 6.3 advpoll.module \advpoll_clear_votes_confirm_form_submit()
  2. 6 advpoll.module \advpoll_clear_votes_confirm_form_submit()
  3. 6.2 advpoll.module \advpoll_clear_votes_confirm_form_submit()
  4. 7 includes/advpoll.pages.inc \advpoll_clear_votes_confirm_form_submit()
  5. 7.2 includes/advpoll.pages.inc \advpoll_clear_votes_confirm_form_submit()

Submit handler for clear votes form.

File

includes/advpoll.pages.inc, line 446
Advanced Poll Pages Include.

Code

function advpoll_clear_votes_confirm_form_submit($form, &$form_state) {
  $nid = (int) check_plain(arg(1));
  db_delete('votingapi_vote')
    ->condition('entity_id', $nid)
    ->condition('entity_type', 'node')
    ->execute();
  drupal_goto('node/' . $nid);
}