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:
parent
3ca4bf725a
commit
0903b1011e
3 changed files with 13 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue