function faq_ask_node_delete in FAQ_Ask 7
Same name and namespace in other branches
- 8 faq_ask.module \faq_ask_node_delete()
Handle deletion of questions Removes any pending answer notifications and term mappings for unpublished questions
Parameters
object $node: Node to be deleted.
File
- ./
faq_ask.module, line 551 - This module is an add-on to the FAQ module that allows users with the 'ask question' permission to create a question which will be queued for an 'expert' to answer.
Code
function faq_ask_node_delete($node) {
// Remove notifications
db_delete('faq_ask_notify')
->condition('nid', $node->nid)
->execute();
// Remove term/nid pairs
db_delete('faq_ask_term_index')
->condition('nid', $node->nid)
->execute();
}