Created
May 31, 2011 17:14
-
-
Save briantully/1000902 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From bf81643a7518199af064d147645b20529f0cec25 Mon Sep 17 00:00:00 2001 | |
From: Brian Tully <[email protected]> | |
Date: Tue, 31 May 2011 12:26:18 -0400 | |
Subject: [PATCH] no ticket - fix for fatal errors due to views not being loaded at time of execution - news_recalls block | |
--- | |
src/sites/all/modules/csearch/cs/cs_blocks.inc | 8 +++++--- | |
.../modules/csearch/cs/cs_utility_functions.inc | 3 ++- | |
2 files changed, 7 insertions(+), 4 deletions(-) | |
diff --git a/src/sites/all/modules/csearch/cs/cs_blocks.inc b/src/sites/all/modules/csearch/cs/cs_blocks.inc | |
index 8a67ab8..bcf7309 100644 | |
--- a/src/sites/all/modules/csearch/cs/cs_blocks.inc | |
+++ b/src/sites/all/modules/csearch/cs/cs_blocks.inc | |
@@ -197,9 +197,10 @@ function _cs_news_and_updates_block() { | |
$product_type = node_load(arg(1)); | |
$nodes = array(); | |
- //$news = cs_get_view_results('news_recalls', 'default', 'fast_answers', $product_type->nid); | |
- //$blogs = cs_get_view_results('news_blogs', 'default', $product_type->nid); | |
+ $news = cs_get_view_results('news_recalls', 'default', 'fast_answers', $product_type->nid); | |
+ $blogs = cs_get_view_results('news_blogs', 'default', $product_type->nid); | |
+/* | |
$nview = views_get_view('news_recalls'); | |
$nview->preview('default', array('fast_answers', $product_type->nid)); | |
$news = $nview->result; | |
@@ -207,7 +208,8 @@ function _cs_news_and_updates_block() { | |
$bview = views_get_view('news_blogs'); | |
$bview->preview('default', array($product_type->nid)); | |
$blogs = $bview->result; | |
- | |
+*/ | |
+ | |
$items = array_merge($news, $blogs); | |
if (!count($items)) return; | |
diff --git a/src/sites/all/modules/csearch/cs/cs_utility_functions.inc b/src/sites/all/modules/csearch/cs/cs_utility_functions.inc | |
index 9803673..046cb4f 100644 | |
--- a/src/sites/all/modules/csearch/cs/cs_utility_functions.inc | |
+++ b/src/sites/all/modules/csearch/cs/cs_utility_functions.inc | |
@@ -40,7 +40,8 @@ function cs_get_view_results($name, $display_id = 'default') { | |
} | |
$view->preview($display_id, $args); | |
- return cs_process_view_field_names($view); | |
+ //return cs_process_view_field_names($view); | |
+ return $view->result; | |
} | |
/** | |
-- | |
1.7.3.1+GitX |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment