function _faq_ask_delete_vocabulary in FAQ_Ask 6.2
Same name and namespace in other branches
- 6 faq_ask.module \_faq_ask_delete_vocabulary()
- 7 faq_ask.module \_faq_ask_delete_vocabulary()
Helper function to delete a vocabulary. @param. $vid - the taxonomy vocabulary id. $edit - the array provided in hook_taxonomy. $my_vocs - the array of faq_ask vocabularies.
@return: none.
1 call to _faq_ask_delete_vocabulary()
- faq_ask_taxonomy in ./
faq_ask.module - Implementation of hook_taxonomy().
File
- ./
faq_ask.module, line 1440 - 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_vocabulary($vid, $edit, $my_vocs) {
global $user;
$name = check_plain($edit['name']);
$uname = $user->name;
drupal_set_message(t("Vocabulary '@name' is being removed from the Faq_Ask list.", array(
'@name' => $name,
)), 'status');
watchdog('Faq_Ask', 'Vocabulary @voc was deleted from Faq_Ask by @name.', array(
'@voc' => $name,
'@name' => $uname,
), WATCHDOG - NOTICE);
unset($my_vocs[$vid]);
variable_set('faq_ask_vocabularies', $my_vocs);
}