From 2c717b18d36f8d4ae6b7b94beeb0fd99a2984c9a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 29 Aug 2010 20:04:02 -0700 Subject: Don't concatenate two strings together as an argument for t() or t2(); the l10n_scanner cannot parse it properly and drops those from the localization list. Fixes ticket #1284. --- modules/g2_import/helpers/g2_import.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (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 f2e9dad9..3753c5f2 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -689,8 +689,7 @@ class g2_import_Core { $title = $g2_item->getTitle(); $title or $title = $g2_item->getPathComponent(); $messages[] = - t("%title from Gallery 2 could not be processed; " . - "(imported as %title)", + t("%title from Gallery 2 could not be processed; (imported as %title)", array("g2_url" => $g2_item_url, "g3_url" => $item->url(), "title" => $title)); -- cgit v1.2.3 From e881693798224f150e577f6b71131d712faf6a7c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 29 Aug 2010 21:29:36 -0700 Subject: Remember which comments we imported and don't import them a second time. Fixes ticket #1282. --- 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 3753c5f2..f2404f60 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -845,6 +845,11 @@ class g2_import_Core { array("id" => $g2_comment_id, "exception" => (string)$e)); } + if (self::map($g2_comment->getId())) { + // Already imported + return; + } + $item_id = self::map($g2_comment->getParentId()); if (empty($item_id)) { // Item was not mapped. @@ -877,6 +882,8 @@ class g2_import_Core { $e); } + self::set_map($g2_comment->getId(), $comment->id, "comment"); + // Backdate the creation date. We can't do this at creation time because // Comment_Model::save() will override it. db::update("comments") -- cgit v1.2.3 From 3707d4e94fc46fb3b92c399111ef6fc7f351aaba Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 29 Aug 2010 21:50:25 -0700 Subject: Properly identify the base G2 url when G2 isn't using the rewrite module. Fixes ticket #1322. --- modules/g2_import/helpers/g2_import.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 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 f2404f60..c3737f8f 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -178,7 +178,17 @@ class g2_import_Core { "module", "rewrite", "modrewrite.embeddedLocation", $g2_embed_location)); g2($gallery->getStorage()->checkPoint()); } - self::$g2_base_url = $g2_embed_location; + + if ($g2_embed_location) { + self::$g2_base_url = $g2_embed_location; + } else { + self::$g2_base_url = $GLOBALS["gallery"]->getUrlGenerator()->generateUrl( + array(), + array("forceSessionId" => false, + "htmlEntities" => false, + "urlEncode" => false, + "useAuthToken" => false)); + } return true; } -- cgit v1.2.3