function library_uninstall in Library 7
Same name and namespace in other branches
- 5.2 library.install \library_uninstall()
- 6.2 library.install \library_uninstall()
- 6 library.install \library_uninstall()
Implements hook_uninstall().
File
- ./
library.install, line 201 - @author Jess Straatmann Install and uninstall all required databases.
Code
function library_uninstall() {
foreach (node_type_get_types() as $type => $info) {
variable_del('library_' . $type . '_due_dates');
variable_del('library_' . $type);
module_load_include('module', 'library', 'library');
foreach (library_actions() as $key => $value) {
variable_del('library_days_for_' . $type . '_' . library_clean_action_name($value['name']));
variable_del('library_hours_for_' . $type . '_' . library_clean_action_name($value['name']));
variable_del('library_period_for_' . $type . '_' . library_clean_action_name($value['name']));
}
}
variable_del('library_links_display_available');
variable_del('library_links_display_unavailable');
variable_del('library_links_display_reference');
variable_del('library_item_barcodes');
variable_del('library_unique_titles');
variable_del('library_cron');
variable_del('library_list_status_display');
variable_del('library_status_display');
variable_del('library_quantity_display');
variable_del('library_taxonomy_display');
variable_del('library_available_text');
variable_del('library_reference_only_text');
variable_del('library_unavailable_noduedates_text');
variable_del('library_send_automatic_email');
variable_del('library_mail_notify_overdue_subject');
variable_del('library_mail_notify_overdue_body');
// Clear the cache tables.
cache_clear_all();
drupal_set_message(st('Library module successfully uninstalled'));
}