You are here

function elysia_cron_uninstall in Elysia Cron 5

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

Implementation of hook_uninstall().

File

./elysia_cron.install, line 69

Code

function elysia_cron_uninstall() {
  $rs = db_query("select name from {variable} where name like 'elysia_cron_%%'");
  while ($o = db_fetch_object($rs)) {
    variable_del($o->name);
  }
  $rs = db_query("select name from {variable} where name like 'ec_%%'");
  while ($o = db_fetch_object($rs)) {
    if (preg_match('/^ec_.*_[a-z]{1,3}$/', $o->name)) {
      variable_del($o->name);
    }
  }
  $rs = db_query("select name from {variable} where name like 'ecc_%%'");
  while ($o = db_fetch_object($rs)) {
    if (preg_match('/^ecc_.*_[a-z]{1,3}$/', $o->name)) {
      variable_del($o->name);
    }
  }
  drupal_set_message('Elysia cron uninstalled.');
}