diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-11-19 21:51:20 -0700 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-11-19 21:51:20 -0700 |
commit | 1a9a4a09dea9368794ded2fb8242a63744133817 (patch) | |
tree | 9df3465a19b107e5b9958a4695324755c164b22a /modules/tag/helpers | |
parent | 9d9cc5382cf55b6530139ec5c326efedb31923b7 (diff) | |
parent | eb34b301a75237a0c27b5cca01e6f96e436b7709 (diff) |
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/tag/helpers')
-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); + } + } + } + } |