From 566c8a1bbc44e410c73b06008346766c01fbecef Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 20 Oct 2014 12:08:35 -0400 Subject: [PATCH 1/2] [ticket/13188] Add missing where clause to post_id query in sphinx index PHPBB3-13188 --- phpBB/phpbb/search/fulltext_sphinx.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index 79d68d2ae1..fdd6657844 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -715,6 +715,7 @@ class fulltext_sphinx ), 'ON' => 'p1.topic_id = p2.topic_id', )), + 'WHERE' => 'p2.post_id = '.((int) $post_id), ); $sql = $this->db->sql_build_query('SELECT', $sql_array); From 941cf6979e3f5367fb18eda3fd525eaaa050bec4 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 20 Oct 2014 12:20:44 -0400 Subject: [PATCH 2/2] [ticket/13188] Correctly format string concatenation PHPBB3-13188 --- phpBB/phpbb/search/fulltext_sphinx.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index fdd6657844..7e3679cef9 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -715,7 +715,7 @@ class fulltext_sphinx ), 'ON' => 'p1.topic_id = p2.topic_id', )), - 'WHERE' => 'p2.post_id = '.((int) $post_id), + 'WHERE' => 'p2.post_id = ' . ((int) $post_id), ); $sql = $this->db->sql_build_query('SELECT', $sql_array);