function advpoll_delete in Advanced Poll 6.3
Same name and namespace in other branches
- 5 advpoll.module \advpoll_delete()
- 6 advpoll.module \advpoll_delete()
- 6.2 advpoll.module \advpoll_delete()
Implementation of hook_delete().
File
- ./
advpoll.module, line 933 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function advpoll_delete($node) {
db_query('DELETE FROM {advpoll} WHERE nid = %d', $node->nid);
db_query('DELETE FROM {advpoll_choices} WHERE nid = %d', $node->nid);
db_query('DELETE FROM {advpoll_electoral_list} WHERE nid = %d', $node->nid);
// TODO: These should be converted to a votingapi method eventually.
db_query("DELETE FROM {votingapi_vote} WHERE content_id = %d AND content_type = 'advpoll'", $node->nid);
db_query("DELETE FROM {votingapi_cache} WHERE content_id = %d AND content_type = 'advpoll'", $node->nid);
}