fixed: Collaboration System threads can return other object types when asked for replies

This commit is contained in:
Graham Knop 2008-03-21 22:01:49 +00:00
parent b6a4aad7c6
commit 77b3c9573c
2 changed files with 8 additions and 2 deletions

View file

@ -12,6 +12,7 @@
- fixed: Importing a package can break when updating a pending asset
- fixed: errors on package importing are always reported as corrupted packages
- fixed: Optional pubDate RSS field generates warnings when missing
- fixed: Collaboration System threads can return other object types when asked for replies
7.5.7
- fixed: HttpProxy mixes original site's content encoding with WebGUI's

View file

@ -289,8 +289,12 @@ Returns a list of the post objects in this thread, including the thread post its
=cut
sub getPosts {
my $self = shift;
$self->getLineage(["self","descendants"], {returnObjects=>1, includeArchived=>1});
my $self = shift;
$self->getLineage(["self","descendants"], {
returnObjects => 1,
includeArchived => 1,
includeOnlyClasses => ["WebGUI::Asset::Post","WebGUI::Asset::Post::Thread"],
});
}
#-------------------------------------------------------------------
@ -905,6 +909,7 @@ sub view {
left join assetData on assetData.assetId=asset.assetId
where asset.lineage like ".$self->session->db->quote($self->get("lineage").'%')
." and asset.state='published'
and asset.className like 'WebGUI::Asset::Post%'
and assetData.revisionDate=(SELECT max(assetData.revisionDate) from assetData where assetData.assetId=asset.assetId
and (
assetData.status in ('approved','archived')