From 69fe2d07f2138b9eb387d690fdb515c6ee7aa34e Mon Sep 17 00:00:00 2001 From: Tristan Olive Date: Wed, 4 Nov 2015 22:39:16 -0500 Subject: [PATCH] Drupal: Fix post counter in import process Posts imported counter was resetting on batch loop rather than per topic, resulting in the wrong number of posts being reported in status messages as imported for a given topic (DBOINC-145) --- .../sites/default/boinc/modules/boincimport/boincimport.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drupal/sites/default/boinc/modules/boincimport/boincimport.module b/drupal/sites/default/boinc/modules/boincimport/boincimport.module index 56f8decc4b..b0ad7c6d11 100644 --- a/drupal/sites/default/boinc/modules/boincimport/boincimport.module +++ b/drupal/sites/default/boinc/modules/boincimport/boincimport.module @@ -2290,7 +2290,6 @@ function boincimport_posts_op($offset, $batch_size, &$context) { } $input_format = variable_get('boincimport_input_format', 0); - $posts_imported = 0; // Get the topics with posts to import db_set_active('boinc'); @@ -2315,6 +2314,7 @@ function boincimport_posts_op($offset, $batch_size, &$context) { $first_post = true; $success = FALSE; + $posts_imported = 0; $empty_posts = 0; $error_posts = 0; $duplicate_posts = 0;