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 ++-- modules/tag/helpers/tag_event.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') 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)); } } diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index d13d1340..e1ab1b73 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -74,7 +74,7 @@ class tag_event_Core { tag::clear_all($item); foreach (preg_split("/[,;]/", $form->edit_item->tags->value) as $tag_name) { if ($tag_name) { - tag::add($item, $tag_name); + tag::add($item, str_replace(" ", ".", $tag_name)); } } tag::compact(); -- cgit v1.2.3 From 070884d9e248ba692e49949851099e4d79285ef2 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 23 Jul 2009 10:23:00 -0700 Subject: Fix for ticket #496. replace the src attribute (non standard) with the title attribute to contain the url of the tag cloud controller. --- modules/tag/js/tag.js | 2 +- modules/tag/views/tag_block.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index a1eaeecd..a5aaa3f8 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -7,7 +7,7 @@ function ajaxify_tag_form() { dataType: "json", success: function(data) { if (data.result == "success") { - $.get($("#gTagCloud").attr("src"), function(data, textStatus) { + $.get($("#gTagCloud").attr("title"), function(data, textStatus) { $("#gTagCloud").html(data); }); } diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php index 9c8f3de5..12c90857 100644 --- a/modules/tag/views/tag_block.html.php +++ b/modules/tag/views/tag_block.html.php @@ -1,5 +1,5 @@ -
"> +
">
\ No newline at end of file -- cgit v1.2.3