function _faq_ask_delete_expert in FAQ_Ask 7
Same name and namespace in other branches
- 6.2 faq_ask.module \_faq_ask_delete_expert()
- 6 faq_ask.module \_faq_ask_delete_expert()
Helper function to delete experts.
@param. $tid - the taxonomy term id for the experts.
@return: none.
2 calls to _faq_ask_delete_expert()
- faq_ask_taxonomy_term_delete in ./
faq_ask.module - Implmentation of hook_taxonomy_term_delete()
- faq_ask_taxonomy_vocabulary_update in ./
faq_ask.module - Implementation of hook_taxonomy_vocabulary_update()
File
- ./
faq_ask.module, line 1910 - 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_delete_expert($tid, $name = NULL) {
//$delete = db_query("DELETE FROM {faq_expert} WHERE tid=%d", $tid);
$delete = db_delete('faq_expert')
->condition('tid', $tid)
->execute();
if ($delete == 0) {
drupal_set_message(t('Attempt to delete expert failed.'), 'error');
}
else {
drupal_set_message(t("Deleted experts for '@name'.", array(
'@name' => $name,
)), 'status');
}
}