Threads should not show pagination query params in their URLs.

This commit is contained in:
Colin Kuskie 2010-01-07 08:34:27 -08:00
parent 2605a4c989
commit b5f5f8f6e8
3 changed files with 28 additions and 1 deletions

View file

@ -336,6 +336,26 @@ sub getAutoCommitWorkflowId {
return $self->getThread->getParent->get("threadApprovalWorkflow");
}
#-------------------------------------------------------------------
=head2 getDirectLinkUrl ( )
Extend the base method from Post to remove the pagination query fragment
=cut
sub getDirectLinkUrl {
my $self = shift;
my $url = $self->SUPER::getDirectLinkUrl();
$url =~ s/\?pn=\d+//;
if ($url =~ m{;revision=\d+}) {
$url =~ s/;revision/?revision/;
}
return $url;
}
#-------------------------------------------------------------------
=head2 getLastPost