From 22631780df9364a2638ec6f2ee158f2b32293b07 Mon Sep 17 00:00:00 2001
From: Sally Young <sally@justafish.co.uk>
Date: Tue, 6 Jan 2015 15:01:30 +0000
Subject: [PATCH] Issue #2102265 by justafish: prevents features from appearing
 as overridden when a multifield has subitems.

---
 multifield.features.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/multifield.features.inc b/multifield.features.inc
index 8274233..4dc943c 100644
--- a/multifield.features.inc
+++ b/multifield.features.inc
@@ -10,8 +10,11 @@ function multifield_field_default_field_bases_alter(&$fields) {
       // subfields have not yet been created. Ideally core should not be
       // storing the schema indexes and foreign keys in the field definition
       // since these are both fetched from hook_field_schema().
-      $fields[$field_name]['indexes'] = array();
-      $fields[$field_name]['foreign keys'] = array();
+      $subfields = multifield_type_get_subfields($field['field_name']);
+      if (empty($subfields)) {
+        $fields[$field_name]['indexes'] = array();
+        $fields[$field_name]['foreign keys'] = array();
+      }
     }
   }
 }
-- 
2.2.1

