diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-19 18:08:32 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-19 18:08:32 -0800 |
commit | eb34b301a75237a0c27b5cca01e6f96e436b7709 (patch) | |
tree | bcfc05a17b049e5452446aebe1a511c80d468539 /modules/tag | |
parent | 23befebd72d714bee0931f7c9f01c6adcc34aeda (diff) |
Add the ability to add tags for files that are uploaded using the simple loader.
Diffstat (limited to 'modules/tag')
-rw-r--r-- | modules/tag/helpers/tag_event.php | 10 |
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); + } + } + } + } |