From fa0c17ab5be2724b7fa850f2077afe7e69d6ef4d Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 23 Jul 2009 09:26:04 -0700 Subject: Make tag handling consistent by converting spaces to periods and using commas or semi-colons as separators --- modules/tag/controllers/tags.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/tag/controllers') diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index 85f6d16e..5dd07935 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -53,10 +53,10 @@ class Tags_Controller extends REST_Controller { $form = tag::get_add_form($item); if ($form->validate()) { - foreach (split("[\,\ \;]", $form->add_tag->inputs["name"]->value) as $tag_name) { + foreach (split("[\,\;]", $form->add_tag->inputs["name"]->value) as $tag_name) { $tag_name = trim($tag_name); if ($tag_name) { - $tag = tag::add($item, $tag_name); + $tag = tag::add($item, str_replace(" ", ".", $tag_name)); } } -- cgit v1.2.3