[ticket/12163] Use posts_per_page to calculate current page in viewtopic.php

PHPBB3-12163
Merge pull request #2004 from prototech/ticket/12163

[ticket/12163] Use posts_per_page to calculate current page in viewtopic.php

* prototech/ticket/12163:
  [ticket/12163] Use posts_per_page to calculate current page in viewtopic.php