getLastPost in Thread.pm should not cast its data, but allow the asset to determine its own type.

This commit is contained in:
Colin Kuskie 2012-08-27 18:26:05 -07:00
parent 55893c0050
commit 93f583d069
2 changed files with 2 additions and 1 deletions

View file

@ -1,6 +1,7 @@
7.10.27
- fixed #12379: userImport documentation error
- fixed #12382: WebGUI::Crud does not work with all form types
- fixed: Threads with no posts return the wrong lastReply data.
7.10.26
- fixed: Template diagnostics when called without a session asset.

View file

@ -450,7 +450,7 @@ sub getLastPost {
my $lastPostId = $self->get("lastPostId");
my $lastPost;
if ($lastPostId) {
$lastPost = WebGUI::Asset::Post->new($self->session, $lastPostId);
$lastPost = WebGUI::Asset->newByDynamicClass($self->session, $lastPostId);
}
return $lastPost if (defined $lastPost);
return $self;