You are here

function ad_text_uninstall in Advertisement 6.3

Same name and namespace in other branches
  1. 5.2 text/ad_text.install \ad_text_uninstall()
  2. 5 text/ad_text.install \ad_text_uninstall()
  3. 6 text/ad_text.install \ad_text_uninstall()
  4. 6.2 text/ad_text.install \ad_text_uninstall()
  5. 7 text/ad_text.install \ad_text_uninstall()

Allow complete uninstallation of the ad_text module.

File

text/ad_text.install, line 57
Ad_text module database schema.

Code

function ad_text_uninstall() {

  // Delete all ad_text content.
  $result = db_query("SELECT aid FROM {ad_text}");
  while ($aid = db_result($result)) {
    node_delete($aid);
  }

  // Remove tables.
  drupal_uninstall_schema('ad_text');
}