Closed (outdated)
Project:
Admin
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2011 at 15:08 UTC
Updated:
29 Oct 2025 at 15:45 UTC
Jump to comment: Most recent
In the code:
/**
* Implementation of hook_enable().
*/
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'");
}
Delete all menu links that begin with admin/*. This is crazy!. If you have added items to the menu such navigation. This module deleted all my admin links without my consent. I think this can not be so without asking.
Comments
Comment #1
trunks commentedThat's really, really dangerous. I had a database backup just a few minutes before enabling this module, thanks $deity. That sql query should only filter menu_links from module_name, insted of link_path (at least, although I think to remove menu entries on enabling a module is quite dangerous).
Comment #2
_vid commentedDuplicate issue. See http://drupal.org/node/611254 Deletes any custom menu links that start with admin
Comment #2.0
_vid commentedChange description
Comment #3
sickness29 commentedDevelopment or support is not planned for D6. All D6-related issues are marked as outdated in a bunch.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!