summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/g2_import/controllers/g2.php1
-rw-r--r--modules/g2_import/helpers/g2_import.php4
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) {