You are here

function domain_menu_access_uninstall in Domain Menu Access 6

Same name and namespace in other branches
  1. 8 domain_menu_access.install \domain_menu_access_uninstall()
  2. 7 domain_menu_access.install \domain_menu_access_uninstall()

Implementation of hook_uninstall().

File

./domain_menu_access.install, line 11
Domain Menu Access module (un)installation functions.

Code

function domain_menu_access_uninstall() {
  $res = db_query("SELECT mlid, options FROM {menu_links}");
  while ($row = db_fetch_array($res)) {
    $options = unserialize($row['options']);
    if (isset($options['domain_menu_access'])) {
      unset($options['domain_menu_access']);
      db_query("UPDATE {menu_links} SET options = '%s' WHERE mlid = %d", serialize($options), $row['mlid']);
    }
  }
}