You are here

function mobile_tools_roles_uninstall in Mobile Tools 6.3

Same name and namespace in other branches
  1. 6.2 modules/mobile_tools_roles/mobile_tools_roles.install \mobile_tools_roles_uninstall()
  2. 7.2 mobile_tools_roles/mobile_tools_roles.install \mobile_tools_roles_uninstall()

File

./mobile_tools_roles.install, line 11
Mobile Tools Roles installation file

Code

function mobile_tools_roles_uninstall() {
  $query = "SELECT * FROM {mobile_tools_roles_relations}";
  $result = db_query($query);
  while ($item = db_fetch_object($result)) {
    db_query("DELETE FROM {role} WHERE rid = %d", $item->mrid);
  }
  drupal_uninstall_schema('mobile_tools_roles');
  variable_del('mobile_tools_roles');
  variable_del('mobile_tools_enable_roles');
}