From c6b4190fab88201f4efaa0d00a6aa823b180f482 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 10 Jun 2006 11:28:30 +0000 Subject: Merge from 3.0 branch till 1148. --- demos/blog/protected/Portlets/CommentPortlet.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'demos/blog/protected/Portlets') diff --git a/demos/blog/protected/Portlets/CommentPortlet.php b/demos/blog/protected/Portlets/CommentPortlet.php index 4147d6d3..711059ff 100644 --- a/demos/blog/protected/Portlets/CommentPortlet.php +++ b/demos/blog/protected/Portlets/CommentPortlet.php @@ -24,7 +24,8 @@ class CommentPortlet extends Portlet public function onLoad($param) { parent::onLoad($param); - $comments=$this->Application->getModule('data')->queryComments('','ORDER BY create_time DESC','LIMIT 10'); + $commentLimit=TPropertyValue::ensureInteger($this->Application->Parameters['RecentComments']); + $comments=$this->Application->getModule('data')->queryComments('','ORDER BY create_time DESC',"LIMIT $commentLimit"); foreach($comments as $comment) { $comment->ID=$this->Service->constructUrl('Posts.ViewPost',array('id'=>$comment->PostID)).'#c'.$comment->ID; -- cgit v1.2.3