function admin_enable in Admin 6
Same name and namespace in other branches
- 6.2 admin.install \admin_enable()
 - 7.2 admin.install \admin_enable()
 
Implementation of hook_enable().
File
- ./
admin.install, line 13  
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'");
}