Fix the CS search, so that links to anchors are correct. Fixes bug #11318
This commit is contained in:
parent
ff1dbc1841
commit
7281a3dd8e
3 changed files with 12 additions and 8 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
- fixed #11311: Search object and modifiers
|
- fixed #11311: Search object and modifiers
|
||||||
- fixed #11314: hover help clarity
|
- fixed #11314: hover help clarity
|
||||||
- fixed #11317: wrong error message in AssetProxy
|
- fixed #11317: wrong error message in AssetProxy
|
||||||
|
- fixed #11318: searching in a collaborationsystem
|
||||||
|
|
||||||
7.8.8
|
7.8.8
|
||||||
- fixed #11289: Gallery with pending version tag causes search engine indexer to puke.
|
- fixed #11289: Gallery with pending version tag causes search engine indexer to puke.
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ sub appendPostListTemplateVars {
|
||||||
if ($self->get("displayLastReply")) {
|
if ($self->get("displayLastReply")) {
|
||||||
my $lastPost = $post->getLastPost();
|
my $lastPost = $post->getLastPost();
|
||||||
%lastReply = (
|
%lastReply = (
|
||||||
"lastReply.url" => $lastPost->getUrl.'#'.$lastPost->getId,
|
"lastReply.url" => $lastPost->getUrl.'#id'.$lastPost->getId,
|
||||||
"lastReply.title" => $lastPost->get("title"),
|
"lastReply.title" => $lastPost->get("title"),
|
||||||
"lastReply.user.isVisitor" => $lastPost->get("ownerUserId") eq "1",
|
"lastReply.user.isVisitor" => $lastPost->get("ownerUserId") eq "1",
|
||||||
"lastReply.username" => $lastPost->get("username"),
|
"lastReply.username" => $lastPost->get("username"),
|
||||||
|
|
@ -142,12 +142,13 @@ sub appendPostListTemplateVars {
|
||||||
}
|
}
|
||||||
$hasRead = $post->isMarkedRead;
|
$hasRead = $post->isMarkedRead;
|
||||||
}
|
}
|
||||||
my $url;
|
my $url;
|
||||||
if ($post->get("status") eq "pending") {
|
if ($post->get("status") eq "pending") {
|
||||||
$url = $post->getUrl("revision=".$post->get("revisionDate"))."#".$post->getId;
|
$url = $post->getUrl("revision=".$post->get("revisionDate"))."#id".$post->getId;
|
||||||
} else {
|
}
|
||||||
$url = $post->getUrl."#".$post->getId;
|
else {
|
||||||
}
|
$url = $post->getUrl."#id".$post->getId;
|
||||||
|
}
|
||||||
my %postVars = (
|
my %postVars = (
|
||||||
%{$post->get},
|
%{$post->get},
|
||||||
"id" => $post->getId,
|
"id" => $post->getId,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ use WebGUI::Session;
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Tests
|
# Tests
|
||||||
plan tests => 21; # Increment this number for each test you create
|
plan tests => 23; # Increment this number for each test you create
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Init
|
# Init
|
||||||
|
|
@ -89,6 +89,8 @@ ok( !$posts->[0]->{'user.isVisitor'}, 'first post made by visitor');
|
||||||
ok( $posts->[0]->{'hideProfileUrl'}, 'hide profile url, and user is visitor');
|
ok( $posts->[0]->{'hideProfileUrl'}, 'hide profile url, and user is visitor');
|
||||||
ok( !$posts->[0]->{'lastReply.user.isVisitor'}, 'lastReply not made by visitor');
|
ok( !$posts->[0]->{'lastReply.user.isVisitor'}, 'lastReply not made by visitor');
|
||||||
ok( $posts->[0]->{'lastReply.hideProfileUrl'}, 'lastReply hide profile url, since user is visitor');
|
ok( $posts->[0]->{'lastReply.hideProfileUrl'}, 'lastReply hide profile url, since user is visitor');
|
||||||
|
is( $posts->[0]->{'lastReply.url'}, $threads[1]->getUrl.'#id'.$threads[1]->getId, 'lastReply url has a query fragment prefixed by "id"');
|
||||||
|
is( $posts->[0]->{'url'}, $threads[1]->getUrl.'#id'.$threads[1]->getId, 'url has a query fragment prefixed by "id"');
|
||||||
|
|
||||||
|
|
||||||
###################################################################
|
###################################################################
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue