diff options
| author | James Atkinson <thefinn@users.sourceforge.net> | 2002-02-03 18:54:56 +0000 |
|---|---|---|
| committer | James Atkinson <thefinn@users.sourceforge.net> | 2002-02-03 18:54:56 +0000 |
| commit | 721207ef48c5b81cfb06fcc10e03f5954890f971 (patch) | |
| tree | 27bd658a2a4e65cf4c2dbdfe610dff79863661cc /phpBB/search.php | |
| parent | b4c40fd7ff74b89d0ebfc7ea5b9337e137cb8ee7 (diff) | |
| download | forums-721207ef48c5b81cfb06fcc10e03f5954890f971.tar forums-721207ef48c5b81cfb06fcc10e03f5954890f971.tar.gz forums-721207ef48c5b81cfb06fcc10e03f5954890f971.tar.bz2 forums-721207ef48c5b81cfb06fcc10e03f5954890f971.tar.xz forums-721207ef48c5b81cfb06fcc10e03f5954890f971.zip | |
Fixed bug #509335
git-svn-id: file:///svn/phpbb/trunk@2048 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
| -rw-r--r-- | phpBB/search.php | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/phpBB/search.php b/phpBB/search.php index 9b3517503f..8ac4ecf9df 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -488,11 +488,25 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) } else if( $search_id == "unanswered" ) { - - $sql = "SELECT topic_id - FROM " . TOPICS_TABLE . " - WHERE topic_replies = 0 + + if($auth_sql != "") + { + $sql = "SELECT t.topic_id, f.forum_id + FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f + WHERE t.topic_replies = 0 + AND t.forum_id = f.forum_id + AND t.topic_moved_id = 0 + AND $auth_sql"; + } + else + { + $sql = "SELECT topic_id + FROM " . TOPICS_TABLE . " + WHERE topic_replies = 0 AND topic_moved_id = 0"; + } + + $result = $db->sql_query($sql); if( !$result ) { |
