function faq_uninstall in Frequently Asked Questions 5.2
Same name and namespace in other branches
- 8 faq.install \faq_uninstall()
- 5 faq.install \faq_uninstall()
- 6 faq.install \faq_uninstall()
- 7 faq.install \faq_uninstall()
Implementation of hook_uninstall().
Remove the variables, nodes and schema corresponding to the FAQ module.
File
- ./
faq.install, line 57 - FAQ module install file.
Code
function faq_uninstall() {
// Delete the variables we created.
variable_del('faq_display');
variable_del('faq_back_to_top');
variable_del('faq_use_categories');
variable_del('faq_category_display');
variable_del('faq_block_recent_faq_count');
variable_del('faq_block_random_faq_count');
variable_del('faq_use_teaser');
variable_del('faq_show_node_links');
variable_del('faq_more_link');
variable_del('faq_description');
variable_del('faq_description_format');
variable_del('faq_group_questions_top');
variable_del('faq_hide_child_terms');
variable_del('faq_show_term_page_children');
variable_del('faq_answer_category_name');
variable_del('faq_question_listing');
variable_del('faq_qa_mark');
variable_del('faq_question_label');
variable_del('faq_answer_label');
variable_del('faq_category_listing');
variable_del('faq_count');
variable_del('faq_omit_vocabulary');
variable_del('faq_enable_term_links');
variable_del('faq_disable_node_links');
variable_del('faq_default_sorting');
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$deleted = db_query("DROP TABLE IF EXISTS {faq_weights}");
$deleted = db_query("DROP TABLE IF EXISTS {faq_questions}");
break;
case 'pgsql':
$deleted = db_query('DROP TABLE {faq_weights}');
$deleted = db_query('DROP TABLE {faq_questions}');
break;
}
// Remove the node type.
node_type_delete('FAQ');
// Clear the cache tables.
cache_clear_all('*', 'cache', TRUE);
cache_clear_all('*', 'cache_filter', TRUE);
cache_clear_all('*', 'cache_menu', TRUE);
cache_clear_all('*', 'cache_page', TRUE);
}