mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +02:00
[ticket/11179] fix success query path for postgres
Additional query to check start parameter executed only incase of no results. PHPBB3-11179
This commit is contained in:
@@ -521,7 +521,6 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
||||
if ($start >= $result_count)
|
||||
{
|
||||
$start = floor(($result_count - 1) / $per_page) * $per_page;
|
||||
}
|
||||
|
||||
$result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
|
||||
|
||||
@@ -532,6 +531,7 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$id_ary = array_unique($id_ary);
|
||||
}
|
||||
|
||||
// store the ids, from start on then delete anything that isn't on the current page because we only need ids for one page
|
||||
$this->save_ids($search_key, implode(' ', $this->split_words), $author_ary, $result_count, $id_ary, $start, $sort_dir);
|
||||
@@ -733,7 +733,6 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
||||
if ($start >= $result_count)
|
||||
{
|
||||
$start = floor(($result_count - 1) / $per_page) * $per_page;
|
||||
}
|
||||
|
||||
$result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
@@ -743,6 +742,7 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$id_ary = array_unique($id_ary);
|
||||
}
|
||||
|
||||
if (sizeof($id_ary))
|
||||
{
|
||||
|
Reference in New Issue
Block a user