diff options
| author | Maat <maat-pub@mageia.biz> | 2012-06-03 21:23:14 +0200 |
|---|---|---|
| committer | Maat <maat-pub@mageia.biz> | 2012-06-03 21:23:14 +0200 |
| commit | a06a38ae692551dc1c0416b835ce9924b3d9f7f5 (patch) | |
| tree | 1bb2c2b3d8d56668585513890afc1d641cead0b1 /phpBB/includes/acp/acp_search.php | |
| parent | 2db884ac2e5122be1db0582b76bf7204783a0c0d (diff) | |
| parent | 19a47dfbbc4265e33c14d6679b5693d80120db4b (diff) | |
| download | forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.tar forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.tar.gz forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.tar.bz2 forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.tar.xz forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.zip | |
Merging with upstream 3.0.11
Diffstat (limited to 'phpBB/includes/acp/acp_search.php')
| -rw-r--r-- | phpBB/includes/acp/acp_search.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index 930c8d2a26..0cd67b1c34 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -392,7 +392,18 @@ class acp_search AND post_id <= ' . (int) ($post_counter + $this->batch_size); $result = $db->sql_query($sql); - while ($row = $db->sql_fetchrow($result)) + $buffer = $db->sql_buffer_nested_transactions(); + + if ($buffer) + { + $rows = $db->sql_fetchrowset($result); + $rows[] = false; // indicate end of array for while loop below + + $db->sql_freeresult($result); + } + + $i = 0; + while ($row = ($buffer ? $rows[$i++] : $db->sql_fetchrow($result))) { // Indexing enabled for this forum or global announcement? // Global announcements get indexed by default. @@ -402,7 +413,10 @@ class acp_search } $row_count++; } - $db->sql_freeresult($result); + if (!$buffer) + { + $db->sql_freeresult($result); + } $post_counter += $this->batch_size; } |
