mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02: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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user