From def6816a6148ee3e22038b2fb0de096475e92ab8 Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Sun, 21 Aug 2011 16:14:13 +0000 Subject: [PATCH] fix blocks --- classes/blocks/BlockBlogs.class.php | 5 +++-- classes/blocks/BlockStream.class.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/classes/blocks/BlockBlogs.class.php b/classes/blocks/BlockBlogs.class.php index 6673b41e..dcd79b01 100644 --- a/classes/blocks/BlockBlogs.class.php +++ b/classes/blocks/BlockBlogs.class.php @@ -23,8 +23,9 @@ class BlockBlogs extends Block { public function Exec() { if ($aResult=$this->Blog_GetBlogsRating(1,Config::Get('block.blogs.row'))) { $aBlogs=$aResult['collection']; - $this->Viewer_Assign('aBlogs',$aBlogs); - $sTextResult=$this->Viewer_Fetch("block.blogs_top.tpl"); + $oViewer=$this->Viewer_GetLocalViewer(); + $oViewer->Assign('aBlogs',$aBlogs); + $sTextResult=$oViewer->Fetch("block.blogs_top.tpl"); $this->Viewer_Assign('sBlogsTop',$sTextResult); } } diff --git a/classes/blocks/BlockStream.class.php b/classes/blocks/BlockStream.class.php index 866a20ec..3942184b 100644 --- a/classes/blocks/BlockStream.class.php +++ b/classes/blocks/BlockStream.class.php @@ -22,8 +22,9 @@ class BlockStream extends Block { public function Exec() { if ($aComments=$this->Comment_GetCommentsOnline('topic',Config::Get('block.stream.row'))) { - $this->Viewer_Assign('aComments',$aComments); - $sTextResult=$this->Viewer_Fetch("block.stream_comment.tpl"); + $oViewer=$this->Viewer_GetLocalViewer(); + $oViewer->Assign('aComments',$aComments); + $sTextResult=$oViewer->Fetch("block.stream_comment.tpl"); $this->Viewer_Assign('sStreamComments',$sTextResult); } }