fixed a bug when a matrix listing didn't have a forum attached

This commit is contained in:
JT Smith 2009-02-06 04:49:57 +00:00
parent 332ace9648
commit 6701a10491

View file

@ -354,6 +354,7 @@ sub upgradeMatrix {
# migrate comments
if($listing->{forumId}){
my $forum = WebGUI::Asset::Wobject::Collaboration->new($session, $listing->{forumId});
if ( defined $forum ) {
my @comments = @{ $forum->getLineage(['descendants'], {
includeOnlyClasses => ["WebGUI::Asset::Post", "WebGUI::Asset::Post::Thread"],
returnObjects => 1,
@ -367,6 +368,7 @@ sub upgradeMatrix {
$newMatrixListing->addComment($content,0,$ownerUser);
}
}
}
}
}
$db->write("drop table Matrix_listing");