diff --git a/includes/context.inc b/includes/context.inc index cf2925709480bd8361e35f593203d77a29adfa46..3348c5e8b06e26f27eeef290e98da02404f83cd5 100644 --- a/includes/context.inc +++ b/includes/context.inc @@ -157,6 +157,13 @@ class ctools_context_required { $contexts = array($contexts); } + // 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) { + $context[strlen($context) -1 ] = 1; + } + if (empty($context) || empty($contexts[$context])) { return FALSE; } diff --git a/views_content/plugins/content_types/views.inc b/views_content/plugins/content_types/views.inc index 8a9c535f9e8868e598e8809a7bb858f16b79a207..3f75f2f4c3d63302965151ac96d463e45a7e2e3b 100644 --- a/views_content/plugins/content_types/views.inc +++ b/views_content/plugins/content_types/views.inc @@ -195,9 +195,12 @@ function views_content_views_content_type_render($subtype, $conf, $panel_args, $ $stored_feeds = drupal_add_feed(); $block->content = $view->preview(); - $block->title = $view->get_title(); + if (empty($view->result) && !$view->display_handler->get_option('empty') && empty($view->style_plugin->definition['even empty'])) { + return; + } + if (!empty($conf['feed_icons'])) { $new_feeds = drupal_add_feed(); if ($diff = array_diff(array_keys($new_feeds), array_keys($stored_feeds))) { diff --git a/views_content/plugins/content_types/views_panes.inc b/views_content/plugins/content_types/views_panes.inc index de4be22454b47f0dd3e9d892914175b81e9a1af7..a87f36b3e101fd4a8a8b88a67d98631a2a47d46c 100644 --- a/views_content/plugins/content_types/views_panes.inc +++ b/views_content/plugins/content_types/views_panes.inc @@ -199,7 +199,6 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a $block = new stdClass(); $block->module = 'views'; $block->delta = $view->name . $display; - $block->title = $view->get_title(); if (($allow['link_to_view'] && !empty($conf['link_to_view'])) || (!$allow['link_to_view'] && $view->display_handler->get_option('link_to_view'))) { @@ -230,6 +229,11 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a $stored_feeds = drupal_add_feed(); $block->content = $view->preview(); + if (empty($view->result) && !$view->display_handler->get_option('empty') && empty($view->style_plugin->definition['even empty'])) { + return; + } + + $block->title = $view->get_title(); if (empty($view->total_rows) || $view->total_rows <= $view->display_handler->get_option('items_per_page')) { unset($block->more);