- Patch #570218 by yched: viewing 'Manage fields' page clears field data cache.
parent
95e95bfbf2
commit
1d2db443ae
modules
|
@ -870,7 +870,7 @@ function field_purge_instance($instance) {
|
|||
module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_purge_instance', $instance);
|
||||
|
||||
// Clear the cache.
|
||||
_field_info_cache_clear();
|
||||
field_info_cache_clear();
|
||||
|
||||
// Invoke external hooks after the cache is cleared for API consistency.
|
||||
module_invoke_all('field_purge_instance', $instance);
|
||||
|
@ -899,7 +899,7 @@ function field_purge_field($field) {
|
|||
module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_purge_field', $field);
|
||||
|
||||
// Clear the cache.
|
||||
_field_info_cache_clear();
|
||||
field_info_cache_clear();
|
||||
|
||||
// Invoke external hooks after the cache is cleared for API consistency.
|
||||
module_invoke_all('field_purge_field', $field);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* need to remove the purged records, but no actual field data items
|
||||
* are affected.
|
||||
*/
|
||||
function _field_info_cache_clear() {
|
||||
function field_info_cache_clear() {
|
||||
_field_info_collate_types(TRUE);
|
||||
drupal_static_reset('field_build_modes');
|
||||
_field_info_collate_fields(TRUE);
|
||||
|
|
|
@ -421,7 +421,7 @@ function field_cache_clear($rebuild_schema = FALSE) {
|
|||
cache_clear_all('*', 'cache_field', TRUE);
|
||||
|
||||
module_load_include('inc', 'field', 'field.info');
|
||||
_field_info_cache_clear();
|
||||
field_info_cache_clear();
|
||||
|
||||
// Refresh the schema to pick up new information.
|
||||
// TODO : if db storage gets abstracted out, we'll need to revisit how and when
|
||||
|
|
|
@ -73,7 +73,7 @@ function field_ui_field_overview_form(&$form_state, $obj_type, $bundle) {
|
|||
|
||||
// When displaying the form, make sure the list of fields is up-to-date.
|
||||
if (empty($form_state['post'])) {
|
||||
field_cache_clear();
|
||||
field_info_cache_clear();
|
||||
}
|
||||
|
||||
// Gather bundle information.
|
||||
|
@ -542,8 +542,6 @@ function field_ui_field_overview_form_submit($form, &$form_state) {
|
|||
unset($_REQUEST['destination']);
|
||||
$form_state['redirect'] = field_ui_get_destinations($destinations);
|
||||
}
|
||||
|
||||
field_cache_clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue