From dde2b149b5909cdd59165aef87552fc6f8b4cb17 Mon Sep 17 00:00:00 2001 From: Frank Dillon Date: Mon, 12 Jan 2009 04:46:25 +0000 Subject: [PATCH] Fixed a bug where posts would error because they didn't point to the thread --- lib/WebGUI/Account/Contributions.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Account/Contributions.pm b/lib/WebGUI/Account/Contributions.pm index 8ff6c00d8..6b74d1280 100644 --- a/lib/WebGUI/Account/Contributions.pm +++ b/lib/WebGUI/Account/Contributions.pm @@ -196,8 +196,15 @@ sub www_view { my @contribs = (); foreach my $row ( @{$p->getPageData} ) { my $assetId = $row->{assetId}; - my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId ); - push(@contribs,$asset->get); + my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId ); + my $props = $asset->get; + if (ref $asset eq "WebGUI::Asset::Post") { + $asset = $asset->getThread; + $props = $asset->get; + $props->{className} = "WebGUI::Asset::Post"; + } + + push(@contribs,$props); } my $contribsCount = $p->getRowCount;