From 35e66121c76297eeca46bdc93335e94bd34652a7 Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 6 Jun 2006 20:01:17 +0000 Subject: Fixed #213. --- demos/blog/protected/Pages/Admin/UserMan.page | 2 +- demos/blog/protected/Portlets/CommentPortlet.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'demos') diff --git a/demos/blog/protected/Pages/Admin/UserMan.page b/demos/blog/protected/Pages/Admin/UserMan.page index 02b1a069..98c1b6ff 100644 --- a/demos/blog/protected/Pages/Admin/UserMan.page +++ b/demos/blog/protected/Pages/Admin/UserMan.page @@ -35,7 +35,7 @@ HeaderText="Role" ItemStyle.HorizontalAlign="Center" ItemStyle.Wrap="false" - ItemStyle.Width="7px" > + ItemStyle.Width="50px" > <%# $this->Parent->DataItem->Role===0 ? 'User' : 'Admin' %> 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