Handle linking to posts not on the first page on a thread view. Fixes bug #11318.
This commit is contained in:
parent
7281a3dd8e
commit
173bec1574
3 changed files with 31 additions and 11 deletions
|
|
@ -130,7 +130,7 @@ sub appendPostListTemplateVars {
|
|||
if ($self->get("displayLastReply")) {
|
||||
my $lastPost = $post->getLastPost();
|
||||
%lastReply = (
|
||||
"lastReply.url" => $lastPost->getUrl.'#id'.$lastPost->getId,
|
||||
"lastReply.url" => $lastPost->getDirectLinkUrl,
|
||||
"lastReply.title" => $lastPost->get("title"),
|
||||
"lastReply.user.isVisitor" => $lastPost->get("ownerUserId") eq "1",
|
||||
"lastReply.username" => $lastPost->get("username"),
|
||||
|
|
@ -142,17 +142,10 @@ sub appendPostListTemplateVars {
|
|||
}
|
||||
$hasRead = $post->isMarkedRead;
|
||||
}
|
||||
my $url;
|
||||
if ($post->get("status") eq "pending") {
|
||||
$url = $post->getUrl("revision=".$post->get("revisionDate"))."#id".$post->getId;
|
||||
}
|
||||
else {
|
||||
$url = $post->getUrl."#id".$post->getId;
|
||||
}
|
||||
my %postVars = (
|
||||
%{$post->get},
|
||||
"id" => $post->getId,
|
||||
"url" => $url,
|
||||
"url" => $post->getDirectLinkUrl,
|
||||
rating_loop => \@rating_loop,
|
||||
"content" => $post->formatContent,
|
||||
"status" => $post->getStatus,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue