summaryrefslogtreecommitdiff
path: root/modules/g2_import/helpers/g2_import.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/g2_import/helpers/g2_import.php')
-rw-r--r--modules/g2_import/helpers/g2_import.php32
1 files changed, 11 insertions, 21 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 4686b23d..7e5c6f75 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -23,7 +23,6 @@ class g2_import_Core {
public static $map = array();
private static $current_g2_item = null;
- private static $order_map = false;
static function is_configured() {
return module::get_var("g2_import", "embed_path");
@@ -314,6 +313,7 @@ class g2_import_Core {
return $message;
}
+
/**
* Import a single album.
*/
@@ -357,26 +357,16 @@ class g2_import_Core {
$album->view_count = g2(GalleryCoreApi::fetchItemViewCount($g2_album_id));
$album->created = $g2_album->getCreationTimestamp();
- if (self::$order_map === false) {
- self::$order_map = array(
- "originationTimestamp" => "captured",
- "creationTimestamp" => "created",
- "description" => "description",
- "modificationTimestamp" => "updated",
- "orderWeight" => "weight",
- "pathComponent" => "name",
- "summary" => "description",
- "title" => "title",
- "viewCount" => "view_count");
- $sort_order = (object)array("fields" => array());
- module::event("get_sort_fields", $sort_order);
- foreach (self::$order_map as $g2_sort_key => $g3_sort_key) {
- if (empty($sort_order->fields[$g3_sort_key])) {
- unset(self::$order_map[$g2_sort_key]);
- }
- }
- }
-
+ $order_map = array(
+ "originationTimestamp" => "captured",
+ "creationTimestamp" => "created",
+ "description" => "description",
+ "modificationTimestamp" => "updated",
+ "orderWeight" => "weight",
+ "pathComponent" => "name",
+ "summary" => "description",
+ "title" => "title",
+ "viewCount" => "view_count");
$direction_map = array(
ORDER_ASCENDING => "asc",
ORDER_DESCENDING => "desc");