fix the next/previous thread thing. It saves an asset instanciation and lets macros using the session asset work correctly

This commit is contained in:
Colin Kuskie 2007-05-15 20:28:32 +00:00
parent cab4e0bccd
commit 11fd0b1ca7
2 changed files with 14 additions and 4 deletions

View file

@ -900,10 +900,10 @@ sub view {
$p->appendTemplateVars($var);
$var->{'add.url'} = $self->getParent->getNewThreadUrl;
my $next = $self->getNextThread;
my $previous = $self->getPreviousThread;
$var->{"previous.url"} = $self->getUrl("func=previousThread") if (defined $previous);
$var->{"next.url"} = $self->getUrl("func=nextThread") if (defined $next);
my $next = $self->getNextThread;
my $previous = $self->getPreviousThread;
$var->{"previous.url"} = $previous->getUrl if (defined $previous);
$var->{"next.url"} = $next->getUrl if (defined $next);
$var->{"search.url"} = $self->getParent->getSearchUrl;
$var->{"collaboration.url"} = $self->getThread->getParent->getUrl;
@ -951,6 +951,10 @@ sub www_lockThread {
Displays the next logical thread after this one.
NOTE:
This method is deprecated. It messes with macros via $session->asset.
=cut
sub www_nextThread {
@ -969,6 +973,10 @@ sub www_nextThread {
Displays the previous logical thread before this one.
NOTE:
This method is deprecated. It messes with macros via $session->asset.
=cut
sub www_previousThread {