1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-05 22:14:59 +02:00

[ticket/15540] Fix post counter

PHPBB3-15540
This commit is contained in:
rubencm 2020-08-19 16:41:42 +00:00
parent a56bfdee8a
commit d78896d581
2 changed files with 3 additions and 3 deletions

View File

@ -274,8 +274,6 @@ class acp_search
$this->max_post_id = $this->get_max_post_id(); $this->max_post_id = $this->get_max_post_id();
$post_counter = (isset($this->state[2])) ? $this->state[2] : 0;
$this->state[2] = &$post_counter;
$this->save_state(); $this->save_state();
switch ($action) switch ($action)

View File

@ -1687,7 +1687,8 @@ class fulltext_native extends base implements search_backend_interface
$starttime = microtime(true); $starttime = microtime(true);
$row_count = 0; $row_count = 0;
$post_counter = $acp_module->state[2];
$post_counter = &$acp_module->state[2];
while (still_on_time() && $post_counter <= $acp_module->max_post_id) while (still_on_time() && $post_counter <= $acp_module->max_post_id)
{ {
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id $sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
@ -1723,6 +1724,7 @@ class fulltext_native extends base implements search_backend_interface
$post_counter += $acp_module->batch_size; $post_counter += $acp_module->batch_size;
} }
// save the current state // save the current state
$acp_module->save_state(); $acp_module->save_state();