From 1c9dee93de837e7bf4a2ba038388ae1836653e0a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 2 Jul 2009 09:54:50 -0700 Subject: Fix for ticket #390. Added a call to GalleryCoreApi::fetchItemViewCounts to retrieve the gallery2 view counts forthe imported items. --- modules/g2_import/helpers/g2_import.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 71199eaf..0a4013ca 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -402,6 +402,7 @@ class g2_import_Core { $g2_album = ORM::factory("item", $g3_album_id); $g2_album->album_cover_item_id = $item->id; $g2_album->thumb_dirty = 1; + $g2_album->view_count = g2(GalleryCoreApi::fetchItemViewCount($g2_album_id)); $g2_album->save(); graphics::generate($g2_album); } @@ -498,6 +499,8 @@ class g2_import_Core { if (isset($item)) { self::set_map($g2_item_id, $item->id); + $item->view_count = g2(GalleryCoreApi::fetchItemViewCount($g2_item_id)); + $item->save(); } if ($corrupt) { -- cgit v1.2.3