Index: includes/features.ctools.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/features/includes/Attic/features.ctools.inc,v
retrieving revision 1.1.2.23
diff -u -p -r1.1.2.23 features.ctools.inc
--- includes/features.ctools.inc	2 Jul 2010 03:17:04 -0000	1.1.2.23
+++ includes/features.ctools.inc	20 Jul 2010 13:16:20 -0000
@@ -204,13 +204,26 @@ function ctools_component_features_expor
  * Master implementation of hook_features_revert() for all ctools components.
  */
 function ctools_component_features_revert($component, $module = 'foo') {
-  $info = _ctools_features_get_info();
-  $objects = module_invoke($module, $info[$component]['default_hook']);
-  if (!empty($objects)) {
+  if (ctools_api_version('1.7')) {
+    ctools_include('export');
     $schema = ctools_export_get_schema($component);
     $export = $schema['export'];
-    $names = db_placeholders(array_keys($objects), $schema['fields'][$export['key']]['type']);
-    db_query("DELETE FROM {{$component}} WHERE {$export['key']} IN ({$names})", array_keys($objects));
+    $objects = _ctools_export_get_defaults($component, $export);
+    foreach ($objects as $object) {
+      if ($object->export_module == $module) {
+        ctools_export_crud_delete($component, $object);
+      }
+    }
+  }
+  else {
+    $info = _ctools_features_get_info();
+    $objects = module_invoke($module, $info[$component]['default_hook']);
+    if (!empty($objects)) {
+      $schema = ctools_export_get_schema($component);
+      $export = $schema['export'];
+      $names = db_placeholders(array_keys($objects), $schema['fields'][$export['key']]['type']);
+      db_query("DELETE FROM {{$component}} WHERE {$export['key']} IN ({$names})", array_keys($objects));
+    }
   }
 }
 
