From 179161d05ee037292202a15507d38166f8a7ee4a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 16 Jun 2010 15:07:13 -0700 Subject: Fix two bugs: #1161: guest comments get dropped because of a missing email address. #1075: G2 comments with " get turned into " --- modules/g2_import/helpers/g2_import.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/g2_import/helpers') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 575d02bb..2a549146 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -826,6 +826,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 +836,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); -- cgit v1.2.3 From 8d1c6887a5120e7fe1302a327043f512c8b5da7d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 16 Jun 2010 15:12:00 -0700 Subject: Fix a bug introduced in 1077477a9032d5a4855e19e2dd4ce923472b711c where we don't generate album highlights correctly. Possible fix for #1054. --- modules/g2_import/helpers/g2_import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/g2_import/helpers') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 2a549146..f0e62854 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -502,7 +502,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'.", -- cgit v1.2.3 From 2025c2c37d8607fa5f296a9b6912577989e90bc3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 16 Jun 2010 15:53:07 -0700 Subject: If the G2 orderBy or orderDirection fields are blank, use the G2 defaults. Second half of fix for #1054. --- modules/g2_import/helpers/g2_import.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/g2_import/helpers') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index f0e62854..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]; -- cgit v1.2.3