summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-10 08:18:58 +0800
committerTim Almdal <tnalmdal@shaw.ca>2009-07-10 08:22:29 +0800
commit1475b772bd256238e7e5e8c0985daede9e18a16f (patch)
tree8ed02f8b2aa5ab9da1dae1341ef254a774a30e39
parent31ffb82382d76390f1206944329dde86c687349c (diff)
Change the tag importer to convert spaces to a dot in multi word tags.
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
-rw-r--r--modules/g2_import/helpers/g2_import.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index d67d4c04..66787467 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -623,8 +623,10 @@ class g2_import_Core {
}
$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);
+ $tags .= (strlen($tags) ? ", " : "") .
+ tag::add($g3_item, preg_replace('/\s\s+/', '.', $tag_name));
}
// Tag operations are idempotent so we don't need to map them. Which is good because we don't