Permalink
Browse files

Don't treat objects like strings.

  • Loading branch information...
1 parent 057e8d0 commit b16ab9d94af3b463c3f3497c0b4cb57416349a27 @bharat bharat committed Dec 24, 2009
Showing with 2 additions and 5 deletions.
  1. +2 −5 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);
}
}
}

0 comments on commit b16ab9d

Please sign in to comment.