From 7fc5f010e9a542b2989a0b2e5b5a54f7c76694d4 Mon Sep 17 00:00:00 2001
From: scottrigby <scott@basekamp.com>
Date: Wed, 6 Jul 2011 16:51:08 -0400
Subject: [PATCH] Issue #1063342 by voxpelli, langworthy, scottrigby: fix hook_features_pipe_COMPONENT_alter()

---
 nodeformcols.module |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/nodeformcols.module b/nodeformcols.module
index 5db4eae..99d6331 100644
--- a/nodeformcols.module
+++ b/nodeformcols.module
@@ -236,12 +236,19 @@ function nodeformcols_node_type($op, $info) {
 }
 
 /**
- * Implementation of hook_features_pipe_alter() for node component.
+ * Implementation of hook_features_pipe_COMPONENT_alter().
  */
-function nodeformcols_features_pipe_node_alter(&$pipe, $data, &$export, $module_name) {
-  if (!empty($data) && module_exists('strongarm')) {
+function nodeformcols_features_pipe_node_alter(&$pipe, $data, &$export) {
+  if (!empty($data)) {
+    $map = features_get_default_map('variable');
     foreach ($data as $node_type) {
-      $pipe['variable'][] = 'nodeformscols_field_placements_'. $node_type .'_default';
+      $variable_name = 'nodeformscols_field_placements_'. $node_type .'_default';
+      if (isset($map[$variable_name])) {
+        $export['dependencies'][$map[$variable_name]] = $map[$variable_name];
+      }
+      else {
+        $pipe['variable'][] = $variable_name;
+      }
     }
   }
 }
-- 
1.7.2.3

