summaryrefslogtreecommitdiff
path: root/modules/field_ui/field_ui.module
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-10-05 07:56:13 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-10-05 07:56:13 -0700
commit63885573b66950ded8d5b81b2563b760b1d748f5 (patch)
tree12e1f6dcb7ddcc275769d2fdf9467b64f8f423c1 /modules/field_ui/field_ui.module
parentfae103736b797c13b960bb041470b63013a393c2 (diff)
downloadbrdo-63885573b66950ded8d5b81b2563b760b1d748f5.tar.gz
brdo-63885573b66950ded8d5b81b2563b760b1d748f5.tar.bz2
Issue #1079966 by dereine, catch: Fixed Notice when renaming bundles.
Diffstat (limited to 'modules/field_ui/field_ui.module')
-rw-r--r--modules/field_ui/field_ui.module11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/field_ui/field_ui.module b/modules/field_ui/field_ui.module
index 17b4aea60..3be23c889 100644
--- a/modules/field_ui/field_ui.module
+++ b/modules/field_ui/field_ui.module
@@ -48,6 +48,17 @@ function field_ui_help($path, $arg) {
}
/**
+ * Implements hook_field_attach_rename_bundle().
+ */
+function field_ui_field_attach_rename_bundle($entity_type, $bundle_old, $bundle_new) {
+ // The Field UI relies on entity_get_info() to build menu items for entity
+ // field administration pages. Clear the entity info cache and ensure that
+ // the menu is rebuilt.
+ entity_info_cache_clear();
+ menu_rebuild();
+}
+
+/**
* Implements hook_menu().
*/
function field_ui_menu() {