diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-02 09:54:50 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-02 09:54:50 -0700 |
commit | 1c9dee93de837e7bf4a2ba038388ae1836653e0a (patch) | |
tree | 34f3c66316378874b589728f21003344c74d3467 | |
parent | e0927b55d9b3310c2752b2b34fb02eccfb5d8288 (diff) |
Fix for ticket #390.
Added a call to GalleryCoreApi::fetchItemViewCounts to retrieve the gallery2
view counts forthe imported items.
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 3 |
1 files changed, 3 insertions, 0 deletions
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) { |