mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
fix a small mistake (bug #2238)
git-svn-id: file:///svn/phpbb/trunk@6068 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
75b3410e83
commit
832faaa6c8
1 changed files with 5 additions and 6 deletions
|
@ -224,12 +224,11 @@ if (!$topic_data)
|
|||
// This is for determining where we are (page)
|
||||
if ($post_id)
|
||||
{
|
||||
$sql = 'SELECT COUNT(p.post_id) AS prev_posts
|
||||
FROM ' . POSTS_TABLE . " p
|
||||
WHERE p.post_approved = 1
|
||||
AND p.topic_id = {$topic_data['topic_id']}
|
||||
" . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . "
|
||||
AND " . (($sort_dir == 'd') ? "p.post_id >= $post_id" : "p.post_id <= $post_id");
|
||||
$sql = 'SELECT COUNT(post_id) AS prev_posts
|
||||
FROM ' . POSTS_TABLE . "
|
||||
WHERE topic_id = {$topic_data['topic_id']}
|
||||
" . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '') . "
|
||||
AND " . (($sort_dir == 'd') ? "post_id >= $post_id" : "post_id <= $post_id");
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
|
Loading…
Add table
Reference in a new issue