From a21c53c9c70c4ee295a74e2078d3a677a9fdf2df Mon Sep 17 00:00:00 2001 From: secretr Date: Tue, 28 Jun 2011 10:33:12 +0000 Subject: [PATCH] forum - last thread fix --- e107_plugins/forum/forum_viewtopic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 84f1b1aab..bbc242811 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -555,8 +555,8 @@ class e107ForumThread break; case 'last': - $pages = ceil(($thread->threadInfo['thread_total_replies'] + 1) / $thread->perPage); - $thread->page = ($pages - 1); + $pages = ceil(($thread->threadInfo['thread_total_replies']) / $thread->perPage); + $thread->page = $_GET['p'] = $pages; break; case 'next': // FIXME - nextprev thread detection not working