Fix how Thread determines the "current" Post to be a little more logical,

and fix shortcuts to non-Thread Posts (they weren't doing prepareView on
the thread).
This commit is contained in:
Drake 2006-11-22 15:38:32 +00:00
parent 3ca4bf725a
commit 0903b1011e
3 changed files with 13 additions and 2 deletions

View file

@ -979,10 +979,19 @@ sub update {
}
#-------------------------------------------------------------------
sub prepareView {
my $self = shift;
$self->SUPER::prepareView;
unless ($self->getThread->getId eq $self->getId) {
# Need the unless to avoid infinite recursion.
$self->getThread->prepareView;
}
}
sub view {
my $self = shift;
$self->incrementViews;
return $self->getThread->view;
return $self->getThread->view($self);
}