From ed831e4ed47dd11c767efd1af1bee48345634652 Mon Sep 17 00:00:00 2001
From: Helior Colorado <me@helior.info>
Date: Thu, 5 Jan 2012 13:24:43 -0800
Subject: [PATCH] Assigning $node as context's data, updated convert callback

---
 plugins/contexts/node_add_form.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/contexts/node_add_form.inc b/plugins/contexts/node_add_form.inc
index 643ac57..df856e2 100644
--- a/plugins/contexts/node_add_form.inc
+++ b/plugins/contexts/node_add_form.inc
@@ -75,7 +75,7 @@ function ctools_context_create_node_add_form($empty, $data = NULL, $conf = FALSE
       $form = drupal_build_form($form_id, $form_state);
 
       // In a form, $data is the object being edited.
-      $context->data     = $type;
+      $context->data     = $node;
       $context->title    = $types[$type]->name;
       $context->argument = $type;
 
@@ -119,6 +119,6 @@ function ctools_context_node_add_form_settings_form_submit($form, &$form_state)
 function ctools_context_node_add_form_convert($context, $type) {
   switch ($type) {
     case 'type':
-      return $context->data;
+      return $context->data->type;
   }
 }
-- 
1.7.6

