diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-03-16 11:17:27 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-03-16 11:17:27 +0000 |
commit | 6a2e8ec1ccf5a44e4983c10db55bd293e4a735d9 (patch) | |
tree | fcdfe2726ee23269278cd7abf01857ad0ff73fde /modules/rss | |
parent | ccc867f62902750a6632de66bc2c8cece1c95abb (diff) |
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.
Diffstat (limited to 'modules/rss')
-rw-r--r-- | modules/rss/helpers/rss_theme.php | 5 |
1 files changed, 5 insertions, 0 deletions
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"); |