You are here

function privatemsg_uninstall in Privatemsg 5.3

Same name and namespace in other branches
  1. 5 privatemsg.install \privatemsg_uninstall()
  2. 6.2 privatemsg.install \privatemsg_uninstall()
  3. 6 privatemsg.install \privatemsg_uninstall()
  4. 7.2 privatemsg.install \privatemsg_uninstall()
  5. 7 privatemsg.install \privatemsg_uninstall()

File

./privatemsg.install, line 150

Code

function privatemsg_uninstall() {
  db_query("DROP TABLE {privatemsg}");
  db_query("DROP TABLE {privatemsg_folder}");
  db_query("DROP TABLE {privatemsg_archive}");
  if (db_table_exists('privatemsg_block_user')) {
    db_query("DROP TABLE {privatemsg_block_user}");
  }

  // The following two tables are now a part of the pm_subscriptions module,
  // but have been retained to handle updated installs that do not use the
  // pm_subscriptions module.
  if (db_table_exists('privatemsg_mails')) {
    db_query("DROP TABLE {privatemsg_mails}");
  }
  if (db_table_exists('privatemsg_mail_edit')) {
    db_query("DROP TABLE {privatemsg_mail_edit}");
  }
  db_query("DELETE FROM {variable} WHERE name LIKE 'privatemsg_%'");
  cache_clear_all('variables', 'cache');
}