summaryrefslogtreecommitdiff
path: root/modules/g2_import/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-02-06 16:14:44 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-02-06 16:14:44 -0800
commitb0a73757d220ca7a60109c50937a5851e5e44227 (patch)
tree0ac99d2608bf723d41c1a80f488af6f2f78a36c3 /modules/g2_import/helpers
parent0f9d23d074c81eafab05ce5d64909da624a86422 (diff)
parent33b39efb491d730c8653ca3c06a22297338aa8b8 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/g2_import/helpers')
-rw-r--r--modules/g2_import/helpers/g2_import.php4
-rw-r--r--modules/g2_import/helpers/g2_import_task.php5
2 files changed, 7 insertions, 2 deletions
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) {
diff --git a/modules/g2_import/helpers/g2_import_task.php b/modules/g2_import/helpers/g2_import_task.php
index e0212b33..2e81adef 100644
--- a/modules/g2_import/helpers/g2_import_task.php
+++ b/modules/g2_import/helpers/g2_import_task.php
@@ -19,14 +19,15 @@
*/
class g2_import_task_Core {
static function available_tasks() {
+ $version = '';
g2_import::lower_error_reporting();
if (g2_import::is_configured()) {
g2_import::init();
+ $version = g2_import::version();
}
- $version = g2_import::version();
g2_import::restore_error_reporting();
- if (class_exists("GalleryCoreApi")) {
+ if (g2_import::is_initialized()) {
return array(Task_Definition::factory()
->callback("g2_import_task::import")
->name(t("Import from Gallery 2"))