diff options
author | Marc Alexander <admin@m-a-styles.de> | 2018-01-06 16:06:59 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2018-01-06 16:06:59 +0100 |
commit | d05c7fd34288375683c5b0467930748b1457ac75 (patch) | |
tree | 6150d8ed2db4e5731ed820bb828dc609a44bb360 /phpBB/phpbb/search/fulltext_postgres.php | |
parent | 39b142077478876b4c2ef270c081681070f264d7 (diff) | |
download | forums-d05c7fd34288375683c5b0467930748b1457ac75.tar forums-d05c7fd34288375683c5b0467930748b1457ac75.tar.gz forums-d05c7fd34288375683c5b0467930748b1457ac75.tar.bz2 forums-d05c7fd34288375683c5b0467930748b1457ac75.tar.xz forums-d05c7fd34288375683c5b0467930748b1457ac75.zip |
[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
Diffstat (limited to 'phpBB/phpbb/search/fulltext_postgres.php')
-rw-r--r-- | phpBB/phpbb/search/fulltext_postgres.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php index 8dbc7212a1..30aeb35ee0 100644 --- a/phpBB/phpbb/search/fulltext_postgres.php +++ b/phpBB/phpbb/search/fulltext_postgres.php @@ -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'; |