mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-13 14:58:52 +00:00
[ticket/11179] fix success query path for mysql
Additional query to check start parameter executed only incase of no results. PHPBB3-11179
This commit is contained in:
parent
16bbdf4a52
commit
f0d63594e6
1 changed files with 18 additions and 18 deletions
|
@ -510,7 +510,6 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
|
||||||
if ($start >= $result_count)
|
if ($start >= $result_count)
|
||||||
{
|
{
|
||||||
$start = floor(($result_count - 1) / $per_page) * $per_page;
|
$start = floor(($result_count - 1) / $per_page) * $per_page;
|
||||||
}
|
|
||||||
|
|
||||||
$result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
|
$result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
|
||||||
|
|
||||||
|
@ -521,6 +520,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
$id_ary = array_unique($id_ary);
|
$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
|
// 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);
|
$this->save_ids($search_key, implode(' ', $this->split_words), $author_ary, $result_count, $id_ary, $start, $sort_dir);
|
||||||
|
@ -696,7 +696,6 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
|
||||||
if ($start >= $result_count)
|
if ($start >= $result_count)
|
||||||
{
|
{
|
||||||
$start = floor(($result_count - 1) / $per_page) * $per_page;
|
$start = floor(($result_count - 1) / $per_page) * $per_page;
|
||||||
}
|
|
||||||
|
|
||||||
$result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
|
$result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
|
@ -706,6 +705,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
$id_ary = array_unique($id_ary);
|
$id_ary = array_unique($id_ary);
|
||||||
|
}
|
||||||
|
|
||||||
if (sizeof($id_ary))
|
if (sizeof($id_ary))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue