From 5fd3b0a1c47c465569185bd37f513076150f8f11 Mon Sep 17 00:00:00 2001
From: OnkelTem <OnkelTem@239962.no-reply.drupal.org>
Date: Tue, 30 Oct 2012 23:07:00 +0400
Subject: [PATCH] Issue #1827342 by OnkelTem: Update term_from_view.inc to
 make term context extraction working

---
 .../plugins/relationships/term_from_view.inc       |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/views_content/plugins/relationships/term_from_view.inc b/views_content/plugins/relationships/term_from_view.inc
index bdd25b8..6994a80 100644
--- a/views_content/plugins/relationships/term_from_view.inc
+++ b/views_content/plugins/relationships/term_from_view.inc
@@ -26,7 +26,7 @@ $plugin = array(
 function views_content_term_from_view_context($context, $conf, $placeholder = FALSE) {
   // If unset it wants a generic, unfilled context, which is just NULL.
   if (empty($context->data) || $placeholder) {
-    return ctools_context_create_empty('term', NULL);
+    return ctools_context_create_empty('entity:taxonomy_term', NULL);
   }
   $view = views_content_context_get_view($context);
   // Ensure the view executes, but we don't need its output.
@@ -36,11 +36,11 @@ function views_content_term_from_view_context($context, $conf, $placeholder = FA
   if (isset($view->result[$row])) {
     $tid = $view->result[$row]->{$view->base_field};
     if ($tid) {
-      $term = taxonomy_get_term($tid);
-      return ctools_context_create('term', $term);
+      $term = taxonomy_term_load($tid);
+      return ctools_context_create('entity:taxonomy_term', $term);
     }
   }
-  return ctools_context_create_empty('term', NULL);
+  return ctools_context_create_empty('entity:taxonomy_term', NULL);
 }
 
 /**
-- 
1.7.9.5

