? BODY-AS-FIELD.patch
? Makefile
? constants.pl
? d6-50-nodes.sql.gz
? d7-50-nodes.sql.gz
? head.kpf
? patches
? modules/field/field.delete.inc
? modules/field/modules/combo
? scripts/generate-autoload.pl
? sites/all/modules/cck
? sites/all/modules/devel
? sites/all/modules/pbs
? sites/all/modules/taint
? sites/default/files
? sites/default/settings.php
Index: modules/field/field.info.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.info.inc,v
retrieving revision 1.5
diff -u -F^[fc] -r1.5 field.info.inc
--- modules/field/field.info.inc	13 Apr 2009 05:18:17 -0000	1.5
+++ modules/field/field.info.inc	29 Apr 2009 22:38:23 -0000
@@ -42,9 +42,6 @@ function _field_get_formatter($display, 
 /**
  * Collate all information on field types, widget types and related structures.
  *
- * @param $reset
- *   If TRUE, clear the cache. The information will be rebuilt from the database
- *   next time it is needed. Defaults to FALSE.
  * @return
  *   If $reset is TRUE, nothing.
  *   If $reset is FALSE, an array containing the following elements:
@@ -69,14 +66,8 @@ function _field_get_formatter($display, 
  *     hook_fieldable_info()
  *   * module: module that exposes the entity type
  */
-function _field_info_collate_types($reset = FALSE) {
-  static $info;
-
-  if ($reset) {
-    $info = NULL;
-    cache_clear_all('field_info_types', 'cache_field');
-    return;
-  }
+function _field_info_collate_types() {
+  $info = &drupal_static(__FUNCTION__);
 
   if (!isset($info)) {
     if ($cached = cache_get('field_info_types', 'cache_field')) {
@@ -149,9 +140,6 @@ function _field_info_collate_types($rese
 /**
  * Collate all information on existing fields and instances.
  *
- * @param $reset
- *   If TRUE, clear the cache. The information will be rebuilt from the database
- *   next time it is needed. Defaults to FALSE.
  * @return
  *   If $reset is TRUE, nothing.
  *   If $reset is FALSE, an array containing the following elements:
@@ -163,14 +151,8 @@ function _field_info_collate_types($rese
  *     are an array, keyed by field name, of all Instance objects in
  *     that bundle.
  */
-function _field_info_collate_fields($reset = FALSE) {
-  static $info;
-
-  if ($reset) {
-    $info = NULL;
-    cache_clear_all('field_info_fields', 'cache_field');
-    return;
-  }
+function _field_info_collate_fields() {
+  $info = &drupal_static(__FUNCTION__);
 
   if (!isset($info)) {
     if ($cached = cache_get('field_info_fields', 'cache_field')) {
Index: modules/field/field.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.module,v
retrieving revision 1.7
diff -u -F^[fc] -r1.7 field.module
--- modules/field/field.module	26 Mar 2009 13:31:24 -0000	1.7
+++ modules/field/field.module	29 Apr 2009 22:38:23 -0000
@@ -305,7 +305,7 @@ function _field_sort_items_value_helper(
  * TODO : move into hook_fieldable_info() ?
  */
 function field_build_modes($obj_type) {
-  static $info;
+  $info = &drupal_static(__FUNCTION__);
 
   if (!isset($info[$obj_type])) {
     // module_invoke_all messes numeric keys.
@@ -326,8 +326,8 @@ function field_cache_clear($rebuild_sche
   cache_clear_all('*', 'cache_field', TRUE);
 
   module_load_include('inc', 'field', 'field.info');
-  _field_info_collate_types(TRUE);
-  _field_info_collate_fields(TRUE);
+  drupal_static_reset('_field_info_collate_types');
+  drupal_static_reset('_field_info_collate_fields');
 
   // Refresh the schema to pick up new information.
   // TODO : if db storage gets abstracted out, we'll need to revisit how and when
Index: modules/field/modules/list/list.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/list/list.module,v
retrieving revision 1.4
diff -u -F^[fc] -r1.4 list.module
--- modules/field/modules/list/list.module	13 Apr 2009 05:18:18 -0000	1.4
+++ modules/field/modules/list/list.module	29 Apr 2009 22:38:23 -0000
@@ -172,7 +172,7 @@ function theme_field_formatter_list_key(
  *  TODO Rework this to create a method of selecting plugable allowed values lists.
  */
 function list_allowed_values($field) {
-  static $allowed_values;
+  $allowed_values = &drupal_static(__FUNCTION__, array());
 
   if (isset($allowed_values[$field['field_name']])) {
     return $allowed_values[$field['field_name']];
