You are here

function ad_image_uninstall in Advertisement 6.2

Same name and namespace in other branches
  1. 5.2 image/ad_image.install \ad_image_uninstall()
  2. 5 image/ad_image.install \ad_image_uninstall()
  3. 6.3 image/ad_image.install \ad_image_uninstall()
  4. 6 image/ad_image.install \ad_image_uninstall()
  5. 7 image/ad_image.install \ad_image_uninstall()

Allow complete uninstallation of the ad_image module.

File

image/ad_image.install, line 121
Ad_image module database schema.

Code

function ad_image_uninstall() {

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

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