aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wigginton <terrafrost@phpbb.com>2009-04-24 17:27:10 +0000
committerJim Wigginton <terrafrost@phpbb.com>2009-04-24 17:27:10 +0000
commitf6bb6dda3f3ab856cd77f06dab649697e695292e (patch)
tree82e395c79eea76169610b0f6df1402cd1c7dd2bb /phpBB/search.php
parentMake sure additional information for accessibility is always exposed to scree... (diff)
downloadphpbb-f6bb6dda3f3ab856cd77f06dab649697e695292e.tar.gz
phpbb-f6bb6dda3f3ab856cd77f06dab649697e695292e.tar.bz2
phpbb-f6bb6dda3f3ab856cd77f06dab649697e695292e.zip
Fixed bug #'ers 42585, 35505, 36675, and 42705
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9482 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 7c21b8dd01..7192127e5a 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -365,13 +365,14 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
else
{
- $sql = 'SELECT t.topic_id
- FROM ' . TOPICS_TABLE . ' t
- WHERE t.topic_last_post_time > ' . $user->data['user_lastvisit'] . '
- AND t.topic_moved_id = 0
- ' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
- ' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . "
- $sql_sort";
+ $sql = 'SELECT t.topic_id
+ FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
+ WHERE p.post_time > ' . $user->data['user_lastvisit'] . '
+ AND t.topic_id = p.topic_id
+ AND t.topic_moved_id = 0
+ ' . $m_approve_fid_sql . '
+ ' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . "
+ $sql_sort";
$field = 'topic_id';
}
break;