summaryrefslogtreecommitdiff
path: root/modules/g2_import/helpers/g2_import_task.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-04-24 22:51:14 -0700
committerBharat Mediratta <bharat@menalto.com>2011-04-24 22:51:14 -0700
commit953be781dc91254599224fa6e95fcc435e787975 (patch)
tree6338b2938a81ae0e78360acba01093d9bc2bd097 /modules/g2_import/helpers/g2_import_task.php
parent701c1fb12f2f254d8d7e7756a09cb5e825123a2f (diff)
Refactor the meat of g2_import::import_album() off into a separate
function so taht we can call it on the root album as well. Fixes
Diffstat (limited to 'modules/g2_import/helpers/g2_import_task.php')
-rw-r--r--modules/g2_import/helpers/g2_import_task.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/g2_import/helpers/g2_import_task.php b/modules/g2_import/helpers/g2_import_task.php
index 5e908676..31615a55 100644
--- a/modules/g2_import/helpers/g2_import_task.php
+++ b/modules/g2_import/helpers/g2_import_task.php
@@ -127,6 +127,12 @@ class g2_import_task_Core {
$g2_root_id = g2(GalleryCoreApi::getDefaultAlbumId());
$tree = g2(GalleryCoreApi::fetchAlbumTree());
$task->set("queue", $queue = array($g2_root_id => $tree));
+
+ // Update the root album to reflect the Gallery2 root album.
+ $root_album = item::root();
+ g2_import::set_album_values(
+ $root_album, g2(GalleryCoreApi::loadEntitiesById($g2_root_id)));
+ $root_album->save();
}
$log_message = g2_import::import_album($queue);
if ($log_message) {