Fix Search results for Threads when useContainers=1

This commit is contained in:
Colin Kuskie 2010-02-25 08:59:33 -08:00
parent 25aad27cdb
commit 3a054b4895
7 changed files with 106 additions and 19 deletions

View file

@ -220,7 +220,8 @@ sub view {
if (defined $asset) {
my $properties = $asset->get;
if ($self->get("useContainers")) {
$properties->{url} = $asset->getContainer->get("url");
$properties->{url} = $asset->isa('WebGUI::Asset::Post::Thread') ? $asset->getCSLinkUrl()
: $asset->getContainer->get("url");
}
#Add highlighting
$properties->{'title' } = $hl->highlight($properties->{title} || '');