- Patch #615484 by yched: remove schema rebuild from field_cache_clear().

merge-requests/26/head
Dries Buytaert 2009-10-31 18:00:48 +00:00
parent a1652efe0e
commit 8a40036a49
2 changed files with 4 additions and 12 deletions

View File

@ -426,21 +426,11 @@ function _field_extra_weights_pre_render($elements) {
}
/**
* Clear the cached information; called in several places when field
* information is changed.
* Clear the field info and field date caches.
*/
function field_cache_clear($rebuild_schema = FALSE) {
function field_cache_clear() {
cache_clear_all('*', 'cache_field', TRUE);
module_load_include('inc', 'field', 'field.info');
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
// we refresh the schema...
if ($rebuild_schema) {
$schema = drupal_get_schema(NULL, TRUE);
}
}
/**

View File

@ -213,6 +213,7 @@ function field_sql_storage_field_storage_create_field($field) {
foreach ($schema as $name => $table) {
db_create_table($name, $table);
}
drupal_get_schema(NULL, TRUE);
}
/**
@ -269,6 +270,7 @@ function field_sql_storage_field_storage_update_field($field, $prior_field, $has
}
}
}
drupal_get_schema(NULL, TRUE);
}
/**