You are here

function ad_image_uninstall in Advertisement 5.2

Same name and namespace in other branches
  1. 5 image/ad_image.install \ad_image_uninstall()
  2. 6.3 image/ad_image.install \ad_image_uninstall()
  3. 6 image/ad_image.install \ad_image_uninstall()
  4. 6.2 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 81

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

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