summaryrefslogtreecommitdiff
path: root/modules/tag
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-11-20 07:14:56 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-11-20 07:14:56 -0800
commit6a9fbffff0a89b7dad843b98d09b694126e4255d (patch)
tree9df3465a19b107e5b9958a4695324755c164b22a /modules/tag
parent0a1c76f9731d3ddd4738465eff46547de7825b3b (diff)
parent1a9a4a09dea9368794ded2fb8242a63744133817 (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/tag')
-rw-r--r--modules/tag/helpers/tag_event.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index 57986e40..19c917ac 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -97,4 +97,14 @@ class tag_event_Core {
static function item_index_data($item, $data) {
$data[] = join(" ", tag::item_tags($item));
}
+
+ static function add_tags_to_item($item, $tags) {
+ foreach (split(",", $tags) as $tag_name) {
+ $tag_name = trim($tag_name);
+ if ($tag_name) {
+ $tag = tag::add($item, $tag_name);
+ }
+ }
+ }
+
}