1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-22 19:07:27 +01:00

Merge pull request #5076 from marc1706/ticket/15496

[ticket/15496] Add sort key to SELECT in fulltext_postgres
This commit is contained in:
Marc Alexander 2018-01-07 11:06:09 +01:00
commit f26b2c00de
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -498,7 +498,7 @@ class fulltext_postgres extends \phpbb\search\base
);
extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_keywords_main_query_before', compact($vars)));
$sql_select = ($type == 'posts') ? 'p.post_id' : 'DISTINCT t.topic_id';
$sql_select = ($type == 'posts') ? 'p.post_id' : 'DISTINCT t.topic_id, ' . $sort_by_sql[$sort_key];
$sql_from = ($join_topic) ? TOPICS_TABLE . ' t, ' : '';
$field = ($type == 'posts') ? 'post_id' : 'topic_id';