From eb34b301a75237a0c27b5cca01e6f96e436b7709 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 19 Nov 2009 18:08:32 -0800 Subject: Add the ability to add tags for files that are uploaded using the simple loader. --- modules/tag/helpers/tag_event.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/tag/helpers') 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); + } + } + } + } -- cgit v1.2.3