summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-17 00:46:53 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-17 00:46:53 +0000
commit17c58c8dceb9dcc96acaaefacf2c6e0c00c06a31 (patch)
treed71c163a64d1ced5f71ffe5c0164ffd9545b1d4f
parent245c840405520ceb943466c70f997fccf268a7ed (diff)
Skip over empty import modes. Fixes ticket #227
-rw-r--r--modules/g2_import/helpers/g2_import_task.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/g2_import/helpers/g2_import_task.php b/modules/g2_import/helpers/g2_import_task.php
index c71997b4..161f0709 100644
--- a/modules/g2_import/helpers/g2_import_task.php
+++ b/modules/g2_import/helpers/g2_import_task.php
@@ -75,6 +75,13 @@ class g2_import_task_Core {
$mode++;
$task->set("last_id", 0);
$queue = array();
+
+ // Start the loop from the beginning again. This way if we get to a mode that requires no
+ // actions (eg, if the G2 comments module isn't installed) we won't try to do any comments
+ // queries.. in the next iteration we'll just skip over that mode.
+ if ($modes[$mode] != "done") {
+ continue;
+ }
}
switch($modes[$mode]) {