diff options
author | xue <> | 2006-06-06 20:01:17 +0000 |
---|---|---|
committer | xue <> | 2006-06-06 20:01:17 +0000 |
commit | 35e66121c76297eeca46bdc93335e94bd34652a7 (patch) | |
tree | 4870bcc097168170ae0a6e128693903796540c82 /demos/blog/protected/Portlets/CommentPortlet.php | |
parent | f7d3151d8594e12c7cccc18dbccce79073fe4cf0 (diff) |
Fixed #213.
Diffstat (limited to 'demos/blog/protected/Portlets/CommentPortlet.php')
-rw-r--r-- | demos/blog/protected/Portlets/CommentPortlet.php | 3 |
1 files changed, 2 insertions, 1 deletions
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;
|