diff options
author | Andy Staudacher <andy.st@gmail.com> | 2010-02-06 15:46:13 -0800 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2010-02-06 15:46:13 -0800 |
commit | 33b39efb491d730c8653ca3c06a22297338aa8b8 (patch) | |
tree | 61d0bbb2c7c5a1b9e6c757dece2d3d3f3563a0f6 /modules/g2_import | |
parent | d069155228acb9c9e86814a89cb2400434d18321 (diff) |
Add core.DownloadItem redirect for G2's Photo and Movie items (was previously omitted, but we already had core.DownloadItem redirects for derivatives)
Diffstat (limited to 'modules/g2_import')
-rw-r--r-- | modules/g2_import/controllers/g2.php | 1 | ||||
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/g2_import/controllers/g2.php b/modules/g2_import/controllers/g2.php index 70461600..8260cf9f 100644 --- a/modules/g2_import/controllers/g2.php +++ b/modules/g2_import/controllers/g2.php @@ -64,6 +64,7 @@ class G2_Controller extends Controller { case "resize": url::redirect($item->resize_url(true)); + case "file": case "full": url::redirect($item->file_url(true)); diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 0fcc0539..f13c63b1 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -541,6 +541,10 @@ class g2_import_Core { $item->save(); self::set_map($g2_item_id, $item->id, "item", $g2_item_url); + + self::set_map($g2_item_id, $item->id, "file", + self::g2_url(array("view" => "core.DownloadItem", "itemId" => $g2_item_id))); + $derivatives = g2(GalleryCoreApi::fetchDerivativesByItemIds(array($g2_item_id))); if (!empty($derivatives[$g2_item_id])) { foreach ($derivatives[$g2_item_id] as $derivative) { |