From 36ecb4d1e2e8ecca5f00538a19eeaea6ab32b455 Mon Sep 17 00:00:00 2001
From: Earl Miles <merlin@logrus.com>
Date: Fri, 1 May 2009 16:11:22 +0000
Subject: [PATCH] Remove stray typo; require that Views panes that appear be
 enabled Views.

---
 includes/context.inc                                | 2 +-
 views_content/plugins/content_types/views.inc       | 4 +++-
 views_content/plugins/content_types/views_panes.inc | 4 ++++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/includes/context.inc b/includes/context.inc
index 55d7651d..c8492b71 100644
--- a/includes/context.inc
+++ b/includes/context.inc
@@ -160,7 +160,7 @@ class ctools_context_required {
     // Due to a bug, some contexts got recorded with an id of 0. This will
     // convert them to the correct ID allowing for some earlier panels
     // to continue to work.
-    if (!empty($context) && $context[strlen($context) - 1] === '0') {\
+    if (!empty($context) && $context[strlen($context) - 1] === '0') {
       $context[strlen($context) - 1] = 1;
     }
 
diff --git a/views_content/plugins/content_types/views.inc b/views_content/plugins/content_types/views.inc
index 4ce68ee0..6da2c328 100644
--- a/views_content/plugins/content_types/views.inc
+++ b/views_content/plugins/content_types/views.inc
@@ -59,7 +59,9 @@ function views_content_views_content_type_content_types($plugin) {
     $views = views_get_all_views();
 
     foreach ($views as $view) {
-      $types[$view->name] = _views_content_views_content_type($view);
+      if (!empty($view->disabled)) {
+        $types[$view->name] = _views_content_views_content_type($view);
+      }
     }
 
     views_cache_set('views_content_all', $types, TRUE);
diff --git a/views_content/plugins/content_types/views_panes.inc b/views_content/plugins/content_types/views_panes.inc
index 29e72693..0700fab3 100644
--- a/views_content/plugins/content_types/views_panes.inc
+++ b/views_content/plugins/content_types/views_panes.inc
@@ -40,6 +40,10 @@ function views_content_views_panes_content_type_content_types($plugin) {
     $views = views_get_all_views();
 
     foreach ($views as $view) {
+      if (!empty($view->disabled)) {
+        continue;
+      }
+
       $view->init_display();
 
       foreach ($view->display as $id => $display) {
-- 
GitLab