From b16ab9d94af3b463c3f3497c0b4cb57416349a27 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 24 Dec 2009 03:08:06 -0800 Subject: [PATCH] Don't treat objects like strings. --- modules/g2_import/helpers/g2_import.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 3cf7eb8070..a7a6974697 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -611,11 +611,9 @@ static function import_tags_for_item(&$queue) { array("id" => $g2_item_id, "exception" => $e->__toString())); } - $tags = ""; // Multiword tags have the space changed to dots.s foreach ($tag_names as $tag_name) { - $tags .= (strlen($tags) ? ", " : "") . - tag::add($g3_item, $tag_name); + tag::add($g3_item, $tag_name); } // Tag operations are idempotent so we don't need to map them. Which is good because we don't @@ -634,11 +632,10 @@ static function import_keywords_as_tags($keywords, $item) { $delim = " "; } - $tags = ""; foreach (preg_split("/$delim/", $keywords) as $keyword) { $keyword = trim($keyword); if ($keyword) { - $tags .= (strlen($tags) ? ", " : "") . tag::add($item, $keyword); + tag::add($item, $keyword); } } }