diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-10 21:46:58 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-10 21:46:58 +0000 |
commit | fbcb01caca780bb9507d554cf84c6e7e093c3a24 (patch) | |
tree | 5519b97999ff7197af4506ae5c2dd0204268696b | |
parent | b8d3478b954a695974fccfc94a7db3aef71b3083 (diff) |
Only run copy_matching_thumbnails_and_resizes() when we're doing an import, else it interferes with thumbnail/resize generation during regular imports
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 8b716a60..8c9b9eb9 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -269,11 +269,18 @@ class g2_import_Core { if (isset($item)) { self::set_map($g2_item_id, $item->id); } + + self::$current_g2_item = null; } // If the thumbnails and resizes created for the Gallery2 photo match the dimensions of the // ones we expect to create for Gallery3, then copy the files over instead of recreating them. static function copy_matching_thumbnails_and_resizes($item) { + // We only operate on items that are being imported + if (empty(self::$current_g2_item)) { + return; + } + // Precaution: if the Gallery2 item was watermarked, or we have the Gallery3 watermark module // active then we'd have to do something a lot more sophisticated here. For now, just skip // this step in those cases. |