From d8011788acb53a5620de0541770d8db85eb385d5 Mon Sep 17 00:00:00 2001
From: OnkelTem <OnkelTem@239962.no-reply.drupal.org>
Date: Mon, 15 Oct 2012 20:33:53 +0400
Subject: [PATCH] Issue #1441668D by csdco: Field Collection Table ignores
 configured view mode

---
 field_collection_table.module |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/field_collection_table.module b/field_collection_table.module
index 26e64e8..04de37d 100644
--- a/field_collection_table.module
+++ b/field_collection_table.module
@@ -37,7 +37,7 @@ function field_collection_table_field_formatter_view($entity_type, $entity, $fie
       $header = array();
       $field_names = array();
       foreach (field_info_instances('field_collection_item', $field['field_name']) as $field_collection_item) {
-        $weight = $field_collection_item['display']['default']['weight'];
+        $weight = $field_collection_item['display'][$settings['view_mode']]['weight'];
         $field_names[$weight] = $field_collection_item['field_name'];
         $header[$weight] = array(
           'data' => $field_collection_item['label'],
-- 
1.7.9.5

