1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/16902] Fix PosgreSQL author topics search results count

PHPBB3-16902
This commit is contained in:
rxu
2021-11-01 00:51:45 +07:00
parent 97906a736f
commit 343551f2ce

View File

@@ -752,8 +752,9 @@ class fulltext_postgres extends base implements search_backend_interface
GROUP BY t.topic_id, $sort_by_sql[$sort_key]";
}
$this->db->sql_query($sql_count);
$result_count = (int) $this->db->sql_fetchfield('result_count');
$result = $this->db->sql_query($sql_count);
$result_count = ($type == 'posts') ? (int) $this->db->sql_fetchfield('result_count') : count($this->db->sql_fetchrowset($result));
$this->db->sql_freeresult($result);
if (!$result_count)
{