summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-26 05:54:48 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-26 05:54:48 +0000
commitd3de3672f18c86f060bc559da3c5bd4f14833071 (patch)
treebf4419f2370d691e723a1d4f60cc9298ced2be40 /modules
parent37339758d1611af9783888c1f837d1c628b3bab1 (diff)
downloadbrdo-d3de3672f18c86f060bc559da3c5bd4f14833071.tar.gz
brdo-d3de3672f18c86f060bc559da3c5bd4f14833071.tar.bz2
#642612 by yched: Add clean way to reset entity_info() cache.
Diffstat (limited to 'modules')
-rw-r--r--modules/field/field.info.inc3
-rw-r--r--modules/field/tests/field_test.module3
-rw-r--r--modules/rdf/rdf.module6
-rw-r--r--modules/rdf/rdf.test3
-rw-r--r--modules/system/system.admin.inc2
5 files changed, 6 insertions, 11 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;
}
diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module
index 7425feeb2..1ca95f6b6 100644
--- a/modules/rdf/rdf.module
+++ b/modules/rdf/rdf.module
@@ -163,8 +163,7 @@ function rdf_mapping_save(&$mapping) {
))
->execute();
- cache_clear_all('entity_info', 'cache');
- drupal_static_reset('entity_get_info');
+ entity_info_cache_clear();
return $status;
}
@@ -258,8 +257,7 @@ function rdf_rdfa_attributes($mapping, $data = NULL) {
function rdf_modules_installed($modules) {
// We need to clear the caches of entity_info as this is not done right
// during the tests. see http://drupal.org/node/594234
- cache_clear_all('entity_info', 'cache');
- drupal_static_reset('entity_get_info');
+ entity_info_cache_clear();
foreach ($modules as $module) {
$function = $module . '_rdf_mapping';
diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test
index 3055a4cd5..242f42399 100644
--- a/modules/rdf/rdf.test
+++ b/modules/rdf/rdf.test
@@ -138,8 +138,7 @@ class RdfMappingDefinitionTestCase extends DrupalWebTestCase {
rdf_modules_installed(array('rdf_test', 'node'));
// entity_info caches must be cleared during testing. This is done
// automatically during the manual installation.
- cache_clear_all('entity_info', 'cache');
- drupal_static_reset('entity_get_info');
+ entity_info_cache_clear();
}
/**
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 80e9c0bea..90930c298 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1055,7 +1055,7 @@ function system_modules_submit($form, &$form_state) {
node_types_rebuild();
menu_rebuild();
cache_clear_all('schema', 'cache');
- cache_clear_all('entity_info', 'cache');
+ entity_info_cache_clear();
drupal_clear_css_cache();
drupal_clear_js_cache();