? 853120_ctools_crud.patch
Index: includes/features.ctools.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/features/includes/Attic/features.ctools.inc,v
retrieving revision 1.1.2.26
diff -u -p -r1.1.2.26 features.ctools.inc
--- includes/features.ctools.inc	24 Jul 2010 21:46:24 -0000	1.1.2.26
+++ includes/features.ctools.inc	5 Aug 2010 21:11:00 -0000
@@ -201,10 +201,17 @@ function ctools_component_features_expor
  */
 function ctools_component_features_revert($component, $module) {
   if ($objects = features_get_default($component, $module)) {
-    $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));
+    if (ctools_api_version('1.7')) {
+      foreach ($objects as $object) {
+        ctools_export_crud_delete($component, $object);
+      }
+    }
+    else {
+      $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));
+    }
   }
 }
 
