You are here

function ad_text_uninstall in Advertisement 5.2

Same name and namespace in other branches
  1. 5 text/ad_text.install \ad_text_uninstall()
  2. 6.3 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 49

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);
  }

  // Drop all ad_text module tables.
  db_query('DROP TABLE {ad_text}');
}