mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/16902] Fix PosgreSQL author topics search results count
PHPBB3-16902
This commit is contained in:
parent
015c9313a7
commit
ba487a24dc
1 changed files with 3 additions and 2 deletions
|
@ -836,8 +836,9 @@ class fulltext_postgres extends \phpbb\search\base
|
||||||
GROUP BY t.topic_id, $sort_by_sql[$sort_key]";
|
GROUP BY t.topic_id, $sort_by_sql[$sort_key]";
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->sql_query($sql_count);
|
$result = $this->db->sql_query($sql_count);
|
||||||
$result_count = (int) $this->db->sql_fetchfield('result_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)
|
if (!$result_count)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue