summaryrefslogtreecommitdiff
path: root/LibertyComment.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2005-06-21 13:59:14 +0000
committerChristian Fowler <spider@viovio.com>2005-06-21 13:59:14 +0000
commit6e836e84fca954a4028f9622cb72d8cd86ca522c (patch)
tree1f94730268f6465f4858a9467d26a687e4c7da48 /LibertyComment.php
parent8746d3b612470f6b3ad9f00bea2e0810fa08f848 (diff)
downloadliberty-6e836e84fca954a4028f9622cb72d8cd86ca522c.tar.gz
liberty-6e836e84fca954a4028f9622cb72d8cd86ca522c.tar.bz2
liberty-6e836e84fca954a4028f9622cb72d8cd86ca522c.zip
add new french translation,
fix "Populate my site" in install my check for empty result sets in LibertyComment and categ_lib
Diffstat (limited to 'LibertyComment.php')
-rw-r--r--LibertyComment.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/LibertyComment.php b/LibertyComment.php
index 8d5dc07..e17917f 100644
--- a/LibertyComment.php
+++ b/LibertyComment.php
@@ -210,16 +210,17 @@ class LibertyComment extends LibertyContent {
if ($contentId) {
$sql = "SELECT tcm.`comment_id` FROM `".BIT_DB_PREFIX."tiki_comments` tcm, `".BIT_DB_PREFIX."tiki_content` tc
WHERE tcm.`parent_id` = ? AND tcm.`content_id` = tc.`content_id` ORDER BY tc.`created`";
- $rs = $this->query( $sql, array($contentId), $pMaxComments, $pOffset );
- $rows = $rs->getRows();
- foreach ($rows as $row) {
- $comment = new LibertyComment($row['comment_id']);
- $comment->mInfo['level'] = $curLevel;
- $curLevel++;
- $comment->mInfo['children'] = $this->getComments($comment->mInfo['content_id']);
- $comment->mInfo['parsed_data'] = $this->parseData($comment->mInfo['data'], $comment->mInfo['format_guid']);
- $curLevel--;
- $ret[] = $comment->mInfo;
+ if( $rs = $this->query( $sql, array($contentId), $pMaxComments, $pOffset ) ) {
+ $rows = $rs->getRows();
+ foreach ($rows as $row) {
+ $comment = new LibertyComment($row['comment_id']);
+ $comment->mInfo['level'] = $curLevel;
+ $curLevel++;
+ $comment->mInfo['children'] = $this->getComments($comment->mInfo['content_id']);
+ $comment->mInfo['parsed_data'] = $this->parseData($comment->mInfo['data'], $comment->mInfo['format_guid']);
+ $curLevel--;
+ $ret[] = $comment->mInfo;
+ }
}
}
return $ret;