mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-06 22:45:02 +02:00
[ticket/15496] Add sort key to SELECT in fulltext_postgres
Postgres requires that the column being ordered also appears in the SELECT part of the query. PHPBB3-15496
This commit is contained in:
parent
39b1420774
commit
d05c7fd342
@ -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)));
|
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, ' : '';
|
$sql_from = ($join_topic) ? TOPICS_TABLE . ' t, ' : '';
|
||||||
$field = ($type == 'posts') ? 'post_id' : 'topic_id';
|
$field = ($type == 'posts') ? 'post_id' : 'topic_id';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user