mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-06 06:25:04 +02:00
Fix a bug with the prev_posts calculation and selecting the last post on a page. ;) Now also add the correct number of previous posts not including the selected one.
git-svn-id: file:///svn/phpbb/trunk@7447 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
24655d4964
commit
d697124aaf
@ -251,11 +251,11 @@ if ($post_id)
|
||||
|
||||
if ($sort_dir == $check_sort)
|
||||
{
|
||||
$topic_data['prev_posts'] = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] + 1 : $topic_data['topic_replies'] + 1;
|
||||
$topic_data['prev_posts'] = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$topic_data['prev_posts'] = 1;
|
||||
$topic_data['prev_posts'] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -271,7 +271,7 @@ if ($post_id)
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$topic_data['prev_posts'] = $row['prev_posts'] + 1;
|
||||
$topic_data['prev_posts'] = $row['prev_posts'] - 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,7 +341,7 @@ if (isset($_GET['e']))
|
||||
// What is start equal to?
|
||||
if ($post_id)
|
||||
{
|
||||
$start = floor(($topic_data['prev_posts'] - 1) / $config['posts_per_page']) * $config['posts_per_page'];
|
||||
$start = floor(($topic_data['prev_posts']) / $config['posts_per_page']) * $config['posts_per_page'];
|
||||
}
|
||||
|
||||
// Get topic tracking info
|
||||
|
Loading…
x
Reference in New Issue
Block a user