diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-26 05:54:48 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-26 05:54:48 +0000 |
commit | d3de3672f18c86f060bc559da3c5bd4f14833071 (patch) | |
tree | bf4419f2370d691e723a1d4f60cc9298ced2be40 /modules/field | |
parent | 37339758d1611af9783888c1f837d1c628b3bab1 (diff) | |
download | brdo-d3de3672f18c86f060bc559da3c5bd4f14833071.tar.gz brdo-d3de3672f18c86f060bc559da3c5bd4f14833071.tar.bz2 |
#642612 by yched: Add clean way to reset entity_info() cache.
Diffstat (limited to 'modules/field')
-rw-r--r-- | modules/field/field.info.inc | 3 | ||||
-rw-r--r-- | modules/field/tests/field_test.module | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/modules/field/field.info.inc b/modules/field/field.info.inc index ef6276415..366a009eb 100644 --- a/modules/field/field.info.inc +++ b/modules/field/field.info.inc @@ -26,8 +26,7 @@ function field_info_cache_clear() { // @todo: Remove this when field_attach_*_bundle() bundle management // functions are moved to the entity API. - drupal_static_reset('entity_get_info'); - cache_clear_all('entity_info', 'cache'); + entity_info_cache_clear(); _field_info_collate_types(TRUE); drupal_static_reset('field_build_modes'); diff --git a/modules/field/tests/field_test.module b/modules/field/tests/field_test.module index dd85c1729..b8b07b96c 100644 --- a/modules/field/tests/field_test.module +++ b/modules/field/tests/field_test.module @@ -105,8 +105,7 @@ function field_test_entity_info_translatable($obj_type = NULL, $translatable = N $stored_value = &drupal_static(__FUNCTION__, array()); if (isset($obj_type)) { $stored_value[$obj_type] = $translatable; - drupal_static_reset('entity_get_info'); - cache_clear_all('entity_info', 'cache'); + entity_info_cache_clear(); } return $stored_value; } |