summaryrefslogtreecommitdiff
path: root/modules/tag/controllers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-27 13:54:20 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-07-27 13:54:20 -0700
commitf21044ae1d4574daa992818afec85045598cd057 (patch)
treeee190a23582345434638e74755e11102ffc2bfff /modules/tag/controllers
parent1f014aae6c16bbda62d8f5937180f11ccb0eb1b1 (diff)
Standardize the specification of tags.
With this patch a comma(,) is the only valid tag separator. Spaces are allowed in tags and phrases no longer need to be specified with a dot.
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r--modules/tag/controllers/tags.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php
index a600ea1a..69178925 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, str_replace(" ", ".", $tag_name));
+ $tag = tag::add($item, $tag_name);
}
}
@@ -81,7 +81,7 @@ class Tags_Controller extends REST_Controller {
public function autocomplete() {
$tags = array();
- $tag_parts = preg_split("#[,\s;]+# ", $this->input->get("q"));
+ $tag_parts = preg_split("#[,\s]+# ", $this->input->get("q"));
$limit = $this->input->get("limit");
$tag_part = end($tag_parts);
$tag_list = ORM::factory("tag")