aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/docs/sphinx.sample.conf4
-rw-r--r--phpBB/includes/search/fulltext_sphinx.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/docs/sphinx.sample.conf b/phpBB/docs/sphinx.sample.conf
index eaef081aa1..3ab2552096 100644
--- a/phpBB/docs/sphinx.sample.conf
+++ b/phpBB/docs/sphinx.sample.conf
@@ -15,7 +15,7 @@ source source_phpbb_{SPHINX_ID}_main
p.forum_id, \
p.topic_id, \
p.poster_id, \
- IF(p.post_id = t.topic_first_post_id, 1, 0) as topic_first_post, \
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post, \
p.post_time, \
p.post_subject, \
p.post_subject as title, \
@@ -47,7 +47,7 @@ source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
p.forum_id, \
p.topic_id, \
p.poster_id, \
- IF(p.post_id = t.topic_first_post_id, 1, 0) as topic_first_post, \
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post, \
p.post_time, \
p.post_subject, \
p.post_subject as title, \
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php
index c223284c72..f505703c09 100644
--- a/phpBB/includes/search/fulltext_sphinx.php
+++ b/phpBB/includes/search/fulltext_sphinx.php
@@ -159,7 +159,7 @@ class phpbb_search_fulltext_sphinx
p.forum_id,
p.topic_id,
p.poster_id,
- IF(p.post_id = t.topic_first_post_id, 1, 0) as topic_first_post,
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
p.post_time,
p.post_subject,
p.post_subject as title,
@@ -191,7 +191,7 @@ class phpbb_search_fulltext_sphinx
p.forum_id,
p.topic_id,
p.poster_id,
- IF(p.post_id = t.topic_first_post_id, 1, 0) as topic_first_post,
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
p.post_time,
p.post_subject,
p.post_subject as title,