function _faq_ask_delete_expert in FAQ_Ask 6
Same name and namespace in other branches
- 6.2 faq_ask.module \_faq_ask_delete_expert()
- 7 faq_ask.module \_faq_ask_delete_expert()
Helper function to delete experts. @param. $tid - the taxonomy term id for the experts.
@return: none.
1 call to _faq_ask_delete_expert()
- faq_ask_taxonomy in ./
faq_ask.module - Implementation of hook_taxonomy(). @param: op: 'insert', 'update, 'delete' type: 'term', 'vocabulary' array: depends on other two.
File
- ./
faq_ask.module, line 979 - 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);
if ($delete === FALSE) {
drupal_set_message(t('Attempt to delete expert failed.'), 'error');
}
else {
drupal_set_message(t("Deleted experts for '@name'.", array(
'@name' => $name,
)), 'status');
}
}