diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /demos/blog/protected/Portlets/CommentPortlet.php | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'demos/blog/protected/Portlets/CommentPortlet.php')
-rw-r--r-- | demos/blog/protected/Portlets/CommentPortlet.php | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/demos/blog/protected/Portlets/CommentPortlet.php b/demos/blog/protected/Portlets/CommentPortlet.php index c3549928..ff8d075a 100644 --- a/demos/blog/protected/Portlets/CommentPortlet.php +++ b/demos/blog/protected/Portlets/CommentPortlet.php @@ -1,40 +1,40 @@ -<?php
-/**
- * CommentPortlet class file
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright © 2006 PradoSoft
- * @license http://www.pradosoft.com/license/
- * @version $Id$
- */
-
-Prado::using('Application.Portlets.Portlet');
-
-/**
- * CommentPortlet class
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright © 2006 PradoSoft
- * @license http://www.pradosoft.com/license/
- */
-class CommentPortlet extends Portlet
-{
- public function onLoad($param)
- {
- parent::onLoad($param);
- $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;
- if(strlen($comment->Content)>40)
- $comment->Content=substr($comment->Content,0,40).' ...';
- }
- $this->CommentList->DataSource=$comments;
- $this->CommentList->dataBind();
- }
-}
-
+<?php +/** + * CommentPortlet class file + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + */ + +Prado::using('Application.Portlets.Portlet'); + +/** + * CommentPortlet class + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + */ +class CommentPortlet extends Portlet +{ + public function onLoad($param) + { + parent::onLoad($param); + $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; + if(strlen($comment->Content)>40) + $comment->Content=substr($comment->Content,0,40).' ...'; + } + $this->CommentList->DataSource=$comments; + $this->CommentList->dataBind(); + } +} + ?>
\ No newline at end of file |