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.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 575d02bb..c0ea09d6 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -438,8 +438,15 @@ class g2_import_Core {
// Only consider G2's first sort order
$g2_order = explode("|", $g2_album->getOrderBy() . "");
$g2_order = $g2_order[0];
+ if (empty($g2_order)) {
+ $g2_order = g2(GalleryCoreApi::getPluginParameter('module', 'core', 'default.orderBy'));
+ }
$g2_order_direction = explode("|", $g2_album->getOrderDirection() . "");
$g2_order_direction = $g2_order_direction[0];
+ if (empty($g2_order_direction)) {
+ $g2_order_direction =
+ g2(GalleryCoreApi::getPluginParameter('module', 'core', 'default.orderDirection'));
+ }
if (array_key_exists($g2_order, $order_map)) {
$album->sort_column = $order_map[$g2_order];
$album->sort_order = $direction_map[$g2_order_direction];
@@ -502,7 +509,7 @@ class g2_import_Core {
}
try {
$g3_album->save();
- graphics::generate($g2_album);
+ graphics::generate($g3_album);
} catch (Exception $e) {
return (string) new G2_Import_Exception(
t("Failed to generate an album highlight for album '%name'.",
@@ -826,6 +833,7 @@ class g2_import_Core {
$text .= " ";
}
$text .= $g2_comment->getComment();
+ $text = html_entity_decode($text);
// Just import the fields we know about. Do this outside of the comment API for now so that
// we don't trigger spam filtering events
@@ -835,6 +843,7 @@ class g2_import_Core {
if ($comment->author_id == identity::guest()->id) {
$comment->guest_name = $g2_comment->getAuthor();
$comment->guest_name or $comment->guest_name = (string) t("Anonymous coward");
+ $comment->guest_email = "unknown@nobody.com";
}
$comment->item_id = $item_id;
$comment->text = self::_transform_bbcode($text);