You are here

function subscriptions_uninstall in Subscriptions 7

Same name and namespace in other branches
  1. 5.2 subscriptions.install \subscriptions_uninstall()
  2. 6 subscriptions.install \subscriptions_uninstall()

Implements hook_uninstall().

File

./subscriptions.install, line 138
Subscriptions module installation.

Code

function subscriptions_uninstall() {
  if (db_table_exists('mail_edit')) {
    db_delete('mail_edit')
      ->condition('id', 'subscriptions_%', 'LIKE')
      ->execute();
  }
  if (db_table_exists('mail_edit_registry')) {
    db_delete('mail_edit_registry')
      ->condition('id', 'subscriptions_%', 'LIKE')
      ->execute();
  }
  variable_del('subscriptions_avoid_empty_subscribe_links');
  variable_del('subscriptions_blocked_content_types');
  variable_del('subscriptions_blocked_nodes');
  variable_del('subscriptions_cron_percent');
  variable_del('subscriptions_form_expanded');
  variable_del('subscriptions_form_in_block');
  variable_del('subscriptions_form_link_only');
  variable_del('subscriptions_generate_full_node');
  variable_del('subscriptions_hide_overview_page');
  variable_del('subscriptions_link_teaser');
  variable_del('subscriptions_omitted_taxa');
  variable_del('subscriptions_restricted_taxa');
  variable_del('subscriptions_send_intervals');
  variable_del('subscriptions_show_by_author_options');
  variable_del('subscriptions_static_content_types');
  variable_del('subscriptions_unlisted_content_types');

  // also remove legacy 5.x-1.9(-dev) variables:
  variable_del('subscriptions_allow_vid');
  variable_del('subscriptions_autoset');
  variable_del('subscriptions_email_body');
  variable_del('subscriptions_email_subject');
  variable_del('subscriptions_sendself');
  variable_del('subscriptions_teaser');
  variable_del('subscriptions_testpost');
  variable_del('subscriptions_usecron');
  variable_del('subscriptions_usersmenu');
}