summaryrefslogtreecommitdiff
path: root/comments_inc.php
diff options
context:
space:
mode:
authorSylvie Greverend <sylvieg@users.sourceforge.net>2006-04-12 15:39:19 +0000
committerSylvie Greverend <sylvieg@users.sourceforge.net>2006-04-12 15:39:19 +0000
commit5b7b1abae1eebc44a91e6b3261c711f61cd3b08b (patch)
tree9dd7195b40dd77c4917def7f0e58e700bded68dc /comments_inc.php
parent90c89742d9e72b0f2ca443bd6eac38c385dd8700 (diff)
downloadliberty-5b7b1abae1eebc44a91e6b3261c711f61cd3b08b.tar.gz
liberty-5b7b1abae1eebc44a91e6b3261c711f61cd3b08b.tar.bz2
liberty-5b7b1abae1eebc44a91e6b3261c711f61cd3b08b.zip
can be able to add to one content and to see the comments of n content-> additional param commentsParentIds
Diffstat (limited to 'comments_inc.php')
-rw-r--r--comments_inc.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/comments_inc.php b/comments_inc.php
index cb6b7f4..7e74b27 100644
--- a/comments_inc.php
+++ b/comments_inc.php
@@ -3,12 +3,12 @@
* comment_inc
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.12 $
+ * @version $Revision: 1.13 $
* @package liberty
* @subpackage functions
*/
-// $Header: /cvsroot/bitweaver/_bit_liberty/comments_inc.php,v 1.12 2006/04/11 13:05:42 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_liberty/comments_inc.php,v 1.13 2006/04/12 15:39:19 sylvieg Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
@@ -26,6 +26,12 @@
// this script may only be included - so its better to die if called directly.
/**
+* @param $commentsParentId = the content id of the object where a new comment will be attached - mandatory
+* @param $commentsParentIds = the list of content id of object the comments will be displayed - if not defined $commentsParentId
+* @param $comments_return_url
+**/
+
+/**
* required setup
*/
require_once (LIBERTY_PKG_PATH.'LibertyComment.php');
@@ -159,7 +165,12 @@ if( !@BitBase::verifyId( $commentsParentId ) ) {
$comments = NULL;
$numComments = 0;
} else {
- $comments = $gComment->getComments( $commentsParentId, $maxComments, $commentOffset, $comments_sort_mode, $comments_display_style );
+ if( @BitBase::verifyId( $commentsParentIds ) ) {
+ $parents = $commentsParentIds;
+ } else {
+ $parents = $commentsParentId;
+ }
+ $comments = $gComment->getComments( $parents, $maxComments, $commentOffset, $comments_sort_mode, $comments_display_style );
$numComments = $gComment->getNumComments( $commentsParentId );
}
$gBitSmarty->assign('comments', $comments);