diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index e86fe1430d..bfac176f73 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -196,7 +196,6 @@ p a {
[Fix] Made Custom BBCode validation more strict (Bug #11335)
[Fix] Proper sync of data on topic copy (Bug #11335)
[Fix] Introduced ORDER BY clauses to converter queries (Bug #10697)
- [Fix] added a sync to post counts during conversion (Bug #11421)
[Fix] Stopped bots from getting added to the registered users group during conversion (Bug #11283)
[Fix] Filled "SMILIEYS_DISABLED" template variable (Bug #11257)
[Fix] Properly escaped the delimiter in disallowed username comparisons (Bug #11339)
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index badac08999..4346c6f4d1 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -59,6 +59,15 @@ function phpbb_insert_forums()
$max_forum_id++;
+ // pruning disabled globally?
+ $sql = "SELECT config_value
+ FROM {$convert->src_table_prefix}config
+ WHERE config_name = 'prune_enable'";
+ $result = $src_db->sql_query($sql);
+ $prune_enabled = (int) $src_db->sql_fetchfield('config_value');
+ $src_db->sql_freeresult($result);
+
+
// Insert categories
$sql = 'SELECT cat_id, cat_title
FROM ' . $convert->src_table_prefix . 'categories
@@ -84,13 +93,7 @@ function phpbb_insert_forums()
break;
}
- // pruning disabled globally?
- $sql = "SELECT config_value
- FROM {$convert->src_table_prefix}config
- WHERE config_name = 'prune_enable'";
- $result = $src_db->sql_query($sql);
- $prune_enabled = (int) $src_db->sql_fetchfield('config_value');
- $src_db->sql_freeresult($result);
+
$cats_added = array();
while ($row = $src_db->sql_fetchrow($result))
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 69ca75c9da..0ef32b1921 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -783,16 +783,8 @@ class install_convert extends module
$jump = request_var('jump', 0);
$final_jump = request_var('final_jump', 0);
$sync_batch = request_var('sync_batch', -1);
- $sync_post_count = request_var('sync_post_count', -1);
$last_statement = request_var('last', 0);
- // We are running sync...
- if ($sync_post_count >= 0)
- {
- $this->sync_user_posts($sync_post_count);
- return;
- }
-
// We are running sync...
if ($sync_batch >= 0)
{
@@ -1171,12 +1163,10 @@ class install_convert extends module
$sql .= (!empty($schema['having'])) ? "\nHAVING " . $schema['having'] : '';
// Order By
-
if (empty($schema['order_by']) && !empty($schema['primary']))
{
$schema['order_by'] = $schema['primary'];
}
-
$sql .= (!empty($schema['order_by'])) ? "\nORDER BY " . $schema['order_by'] : '';
// Counting basically holds the amount of rows processed.
@@ -1412,78 +1402,6 @@ class install_convert extends module
return;
}
- /**
- * Sync function being executed at the middle, some functions need to be executed after a successful sync.
- */
- function sync_user_posts($sync_batch)
- {
- global $db, $template, $user;
- global $convert;
-
- $template->assign_block_vars('checks', array(
- 'S_LEGEND' => true,
- 'LEGEND' => $user->lang['SYNC_POST_COUNT'],
- ));
-
- $batch_size = $convert->batch_size;
-
- $sql = 'SELECT COUNT(user_id) AS max_value
- FROM ' . USERS_TABLE;
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // Set values of minimum/maximum primary value for this table.
- $primary_min = 0;
- $primary_max = $row['max_value'];
-
- if ($sync_batch == 1)
- {
- $sync_batch = (int) $primary_min;
- }
- // Fetch a batch of rows, process and insert them.
- while ($sync_batch <= $primary_max && still_on_time())
- {
- $end = ($sync_batch + $batch_size - 1);
-
-
- $template->assign_block_vars('checks', array(
- 'TITLE' => sprintf($user->lang['SYNC_POST_COUNT_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' KB]' : ''),
- 'RESULT' => $user->lang['DONE'],
- ));
-
- $sync_batch += $batch_size;
- }
-
- if ($sync_batch >= $primary_max)
- {
- sync_post_count($sync_batch, $batch_size);
- $url = $this->save_convert_progress('&sync_batch=0');
-
- $template->assign_vars(array(
- 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
- 'U_ACTION' => $url,
- ));
-
- $this->meta_refresh($url);
- return;
- }
- else
- {
- $sync_batch--;
- }
-
- $url = $this->save_convert_progress('&sync_post_count=' . $sync_batch);
-
- $template->assign_vars(array(
- 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
- 'U_ACTION' => $url,
- ));
-
- $this->meta_refresh($url);
- return;
- }
-
/**
* Sync function being executed at the middle, some functions need to be executed after a successful sync.
*/
@@ -1801,8 +1719,9 @@ class install_convert extends module
'RESULT' => $user->lang['DONE'],
));
- // Continue with synchronizing the post counts...
- $url = $this->save_convert_progress('&sync_post_count=0');
+ // Continue with synchronizing the forums...
+ $url = $this->save_convert_progress('&sync_batch=0');
+
$template->assign_vars(array(
'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
'U_ACTION' => $url,