You are here

function admin_enable in Admin 6.2

Same name and namespace in other branches
  1. 6 admin.install \admin_enable()
  2. 7.2 admin.install \admin_enable()

Implementation of hook_enable().

File

./admin.install, line 26

Code

function admin_enable() {
  $result = db_query("SELECT * FROM {menu_links} WHERE link_path LIKE 'admin%'");
  while ($item = db_fetch_array($result)) {
    _menu_delete_item($item, TRUE);
  }
  menu_rebuild();

  // Weight admin to come after other modules -- in particular, admin_theme().
  db_query("UPDATE {system} SET weight = 1 WHERE name = 'admin' AND type = 'module'");
}