From 6a2e8ec1ccf5a44e4983c10db55bd293e4a735d9 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 16 Mar 2009 11:17:27 +0000 Subject: Set $item and $tag in the Theme_View so that calls like $theme->item() which fall through to calling &View::__get() have an lvalue to return, else you can't return them by reference. Also, don't show sidebar blocks for pages that don't have an item so that the rss and tag modules don't break the search page. --- modules/rss/helpers/rss_theme.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/rss/helpers') diff --git a/modules/rss/helpers/rss_theme.php b/modules/rss/helpers/rss_theme.php index 634d24bb..5616b4a4 100644 --- a/modules/rss/helpers/rss_theme.php +++ b/modules/rss/helpers/rss_theme.php @@ -31,6 +31,11 @@ class rss_theme_Core { } static function sidebar_blocks($theme) { + // @todo this needs to be data driven + if (!$theme->item()) { + return; + } + $block = new Block(); $block->css_id = "gRss"; $block->title = t("Available RSS Feeds"); -- cgit v1.2.3