Commit 3c4d5689 authored by Dries's avatar Dries
Browse files

- Patch #217803 by csevb10 and senpai: uninstall system does not correctly...

- Patch #217803 by csevb10 and senpai: uninstall system does not correctly remove dynamic menu items when a module is deleted.
parent bbc65c30
......@@ -373,12 +373,15 @@ function drupal_install_system() {
* The module to uninstall.
*/
function drupal_uninstall_module($module) {
// First, retrieve all the module's menu paths from db.
drupal_load('module', $module);
$paths = module_invoke($module, 'menu');
// Uninstall the module(s).
module_load_install($module);
module_invoke($module, 'uninstall');
// Remove menu links for paths declared by this module.
drupal_load('module', $module);
$paths = module_invoke($module, 'menu');
// Now remove the menu links for all paths declared by this module.
if (!empty($paths)) {
$paths = array_keys($paths);
// Clean out the names of load functions.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment