summaryrefslogtreecommitdiff
path: root/modules/g2_import/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-04-24 21:02:34 -0700
committerBharat Mediratta <bharat@menalto.com>2011-04-24 21:02:34 -0700
commitea2127c3b2ddef5709e02b4804c074bd1f942159 (patch)
tree4664f65001ad7d6310387aa3258a008b0f7d2d86 /modules/g2_import/helpers
parent6100de33ac9ec61350301b4c1f45bcaf383e4841 (diff)
Fix a bug introduced in f2477703faa7cd05ff1aa16da3ecef7b666bef40 which
was a fix for #1581 that caused us to skip adding highlights for any albums that had no sub-albums.
Diffstat (limited to 'modules/g2_import/helpers')
-rw-r--r--modules/g2_import/helpers/g2_import.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 23fb29e5..e9c19c9d 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -518,12 +518,11 @@ class g2_import_Core {
static function set_album_highlight(&$queue) {
// Dequeue the current album and enqueue its children
list($g2_album_id, $children) = each($queue);
- if (empty($children)) {
- return;
- }
unset($queue[$g2_album_id]);
- foreach ($children as $key => $value) {
- $queue[$key] = $value;
+ if (!empty($children)) {
+ foreach ($children as $key => $value) {
+ $queue[$key] = $value;
+ }
}
$messages = array();