Index: field.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.api.php,v
retrieving revision 1.2
diff -u -r1.2 field.api.php
--- field.api.php	10 Feb 2009 03:16:14 -0000	1.2
+++ field.api.php	7 Mar 2009 16:56:18 -0000
@@ -6,6 +6,9 @@
  * @{
  */
 
+define('FIELD_STORAGE_INSERT', FALSE);
+define('FIELD_STORAGE_UPDATE', TRUE);
+
 /**
  * Inform the Field API about one or more fieldable types (object
  * types to which fields can be attached).
@@ -556,11 +559,11 @@
  *   The entity type of object, such as 'node' or 'user'.
  * @param $object
  *   The object on which to operate.
- * @param $update
- *   TRUE if this is an update to an existing object, FALSE if it is
- *   an insert of a new object.
+ * @param $op
+ *   FIELD_STORAGE_UPDATE if this is an update to an existing object,
+ *   FIELD_STORAGE_INSERT if it is an insert of a new object.
  */
-function hook_field_storage_write($obj_type, $object, $update = TRUE) {
+function hook_field_storage_write($obj_type, $object, $op = FIELD_STORAGE_UPDATE) {
 }
 
 /**
Index: field.attach.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.attach.inc,v
retrieving revision 1.3
diff -u -r1.3 field.attach.inc
--- field.attach.inc	10 Feb 2009 03:16:14 -0000	1.3
+++ field.attach.inc	7 Mar 2009 17:22:56 -0000
@@ -386,7 +386,7 @@
   }
 
   _field_invoke('insert', $obj_type, $object);
-  module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_write', $obj_type, $object);
+  module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_write', $obj_type, $object, FIELD_STORAGE_UPDATE);
 
   list($id, $vid, $bundle, $cacheable) = field_attach_extract_ids($obj_type, $object);
   if ($cacheable) {
@@ -411,7 +411,7 @@
   }
 
   _field_invoke('update', $obj_type, $object);
-  module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_write', $obj_type, $object, TRUE);
+  module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_write', $obj_type, $object, FIELD_STORAGE_UPDATE);
 
   list($id, $vid, $bundle, $cacheable) = field_attach_extract_ids($obj_type, $object);
   if ($cacheable) {
Index: modules/field_sql_storage/field_sql_storage.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/field_sql_storage/field_sql_storage.module,v
retrieving revision 1.4
diff -u -r1.4 field_sql_storage.module
--- modules/field_sql_storage/field_sql_storage.module	10 Feb 2009 03:16:14 -0000	1.4
+++ modules/field_sql_storage/field_sql_storage.module	7 Mar 2009 17:21:54 -0000
@@ -229,7 +229,7 @@
   return $additions;
 }
 
-function field_sql_storage_field_storage_write($obj_type, $object, $update = FALSE) {
+function field_sql_storage_field_storage_write($obj_type, $object, $op = FIELD_STORAGE_INSERT) {
   list($id, $vid, $bundle) = field_attach_extract_ids($obj_type, $object);
   $etid = _field_sql_storage_etid($obj_type);
 

