Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
nibsirahsieu committed Jun 7, 2011
1 parent c83ec79 commit 587e688
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/sfNestedCommentTools.class.php 100644 → 100755
Expand Up @@ -58,11 +58,11 @@ public static function getComments(BaseObject $commentableObject, sfWebRequest $
}
if (sfNestedCommentConfig::isNestedEnabled())
{
$comments = $commentableObject->getApprovedCommentsLevel1($page, sfNestedCommentConfig::getMaxPerPageComment());
$comments = $commentableObject->getApprovedCommentsLevel1(sfNestedCommentConfig::getMaxPerPageComment(), $page);
}
else
{
$comments = $commentableObject->getApprovedComments($page, sfNestedCommentConfig::getMaxPerPageComment());
$comments = $commentableObject->getApprovedComments(sfNestedCommentConfig::getMaxPerPageComment(), $page);
}
return $comments;
}
Expand Down Expand Up @@ -93,6 +93,7 @@ static public function clean($text)
//http://brenelz.com/blog/creating-an-ellipsis-in-php/
public static function ellipsis($text, $append='…')
{
$text = strip_tags($text);
$max = sfNestedCommentConfig::getMaxRecentTitleLength();
if (strlen($text) <= $max) return $text;
$out = substr($text,0,$max);
Expand Down

0 comments on commit 587e688

Please sign in to comment.