diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-08-11 14:59:40 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-08-11 14:59:40 +0000 |
commit | 9c0e6e92426a061f78e6dfe685c7c37c7f72bc62 (patch) | |
tree | 77be265c750278d74f0a822f934ee37631848fd0 /modules/field/field.module | |
parent | 9a8cfc2fd10bd5d66ec0b73824be90d328f97781 (diff) | |
download | brdo-9c0e6e92426a061f78e6dfe685c7c37c7f72bc62.tar.gz brdo-9c0e6e92426a061f78e6dfe685c7c37c7f72bc62.tar.bz2 |
- Patch #367753 by yched, bjaspan: add support for bulk deletion to Fields API.
Diffstat (limited to 'modules/field/field.module')
-rw-r--r-- | modules/field/field.module | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/field/field.module b/modules/field/field.module index 18a77b412..2be05058d 100644 --- a/modules/field/field.module +++ b/modules/field/field.module @@ -55,6 +55,10 @@ require(DRUPAL_ROOT . '/modules/field/field.attach.inc'); * pluggable back-end storage system for actual field data. The * default implementation, field_sql_storage.module, stores field data * in the local SQL database. + + * - @link field_purge Field API bulk data deletion @endlink. Cleans + * up after bulk deletion operations such as field_delete_field() + * and field_delete_instance(). */ /** @@ -178,6 +182,16 @@ function field_theme() { } /** + * Implement hook_cron(). + * + * Purges some deleted Field API data, if any exists. + */ +function field_cron() { + $limit = variable_get('field_purge_batch_size', 10); + field_purge_batch($limit); +} + +/** * Implement hook_modules_installed(). */ function field_modules_installed($modules) { @@ -337,8 +351,7 @@ function field_cache_clear($rebuild_schema = FALSE) { cache_clear_all('*', 'cache_field', TRUE); module_load_include('inc', 'field', 'field.info'); - _field_info_collate_types(TRUE); - _field_info_collate_fields(TRUE); + _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 |