Fix the CS search, so that links to anchors are correct. Fixes bug #11318

This commit is contained in:
Colin Kuskie 2010-01-05 16:47:56 -08:00
parent ff1dbc1841
commit 7281a3dd8e
3 changed files with 12 additions and 8 deletions

View file

@ -130,7 +130,7 @@ sub appendPostListTemplateVars {
if ($self->get("displayLastReply")) {
my $lastPost = $post->getLastPost();
%lastReply = (
"lastReply.url" => $lastPost->getUrl.'#'.$lastPost->getId,
"lastReply.url" => $lastPost->getUrl.'#id'.$lastPost->getId,
"lastReply.title" => $lastPost->get("title"),
"lastReply.user.isVisitor" => $lastPost->get("ownerUserId") eq "1",
"lastReply.username" => $lastPost->get("username"),
@ -142,12 +142,13 @@ sub appendPostListTemplateVars {
}
$hasRead = $post->isMarkedRead;
}
my $url;
if ($post->get("status") eq "pending") {
$url = $post->getUrl("revision=".$post->get("revisionDate"))."#".$post->getId;
} else {
$url = $post->getUrl."#".$post->getId;
}
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,