aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search/fulltext_mysql.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2012-12-02 14:15:04 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-02-19 00:52:51 +0530
commitf0d63594e68fa7a165b8ba90d0fcf35f38e42de9 (patch)
treed51b135c4cbe6c603b3bb8f5750d4157a9614f4a /phpBB/includes/search/fulltext_mysql.php
parent16bbdf4a52b2cb2fa4aa2cd607ae726ea1c7af67 (diff)
downloadforums-f0d63594e68fa7a165b8ba90d0fcf35f38e42de9.tar
forums-f0d63594e68fa7a165b8ba90d0fcf35f38e42de9.tar.gz
forums-f0d63594e68fa7a165b8ba90d0fcf35f38e42de9.tar.bz2
forums-f0d63594e68fa7a165b8ba90d0fcf35f38e42de9.tar.xz
forums-f0d63594e68fa7a165b8ba90d0fcf35f38e42de9.zip
[ticket/11179] fix success query path for mysql
Additional query to check start parameter executed only incase of no results. PHPBB3-11179
Diffstat (limited to 'phpBB/includes/search/fulltext_mysql.php')
-rw-r--r--phpBB/includes/search/fulltext_mysql.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index ad5119f67c..4dc62753aa 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -510,17 +510,17 @@ class phpbb_search_fulltext_mysql 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);
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
- while ($row = $this->db->sql_fetchrow($result))
- {
- $id_ary[] = (int) $row[$field];
- }
- $this->db->sql_freeresult($result);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = (int) $row[$field];
+ }
+ $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
$this->save_ids($search_key, implode(' ', $this->split_words), $author_ary, $result_count, $id_ary, $start, $sort_dir);
@@ -696,16 +696,16 @@ class phpbb_search_fulltext_mysql 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))
- {
- $id_ary[] = (int) $row[$field];
- }
- $this->db->sql_freeresult($result);
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = (int) $row[$field];
+ }
+ $this->db->sql_freeresult($result);
- $id_ary = array_unique($id_ary);
+ $id_ary = array_unique($id_ary);
+ }
if (sizeof($id_ary))
{