Fix direct linking to posts and threads when their pagination is set to 0. Fixes bug #11464.
This commit is contained in:
parent
eccf6a5021
commit
21e321012c
4 changed files with 12 additions and 3 deletions
|
|
@ -352,7 +352,8 @@ sub getCSLinkUrl {
|
|||
my $self = shift;
|
||||
my $url;
|
||||
my $cs = $self->getParent;
|
||||
my $page_size = $cs->get('threadsPerPage');
|
||||
my $paginator = WebGUI::Paginator->new($self->session, '', $self->getParent->get('threadsPerPage'));
|
||||
my $page_size = $paginator->{_rpp}; ##To make sure defaults are handled correctly.
|
||||
my $place = $self->getRank+1;
|
||||
my $last_place = $cs->getLastChild->getRank+1;
|
||||
my $page = int(($last_place - $place)/$page_size) + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue