Commit 9fb0bbc2 authored by fago's avatar fago
Browse files

Issue #1447046: do not call menu_rebuild() in API functions.

parent 5badc725
......@@ -1299,7 +1299,10 @@ function field_collection_field_create_field($field) {
// Clear caches.
entity_info_cache_clear();
menu_rebuild();
// Do not directly issue menu rebuilds here to avoid potentially multiple
// rebuilds. Instead, let menu_get_item() issue the rebuild on the next
// request.
variable_set('menu_rebuild_needed', TRUE);
}
}
......@@ -1313,7 +1316,10 @@ function field_collection_field_delete_field($field) {
// Clear caches.
entity_info_cache_clear();
menu_rebuild();
// Do not directly issue menu rebuilds here to avoid potentially multiple
// rebuilds. Instead, let menu_get_item() issue the rebuild on the next
// request.
variable_set('menu_rebuild_needed', TRUE);
}
}
......
Supports Markdown
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