diff options
-rw-r--r-- | modules/tag/helpers/tag_event.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index 8291cbb7..1025c9d2 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -24,15 +24,17 @@ class tag_event_Core { * * @param Item_Model $photo */ - static function photo_created($photo) { - $path = $photo->file_path(); - $tags = array(); - $size = getimagesize($photo->file_path(), $info); - if (is_array($info) && !empty($info["APP13"])) { - $iptc = iptcparse($info["APP13"]); - if (!empty($iptc["2#025"])) { - foreach($iptc["2#025"] as $tag) { - $tags[$tag]= 1; + static function item_created($photo) { + if ($photo->is_photo()) { + $path = $photo->file_path(); + $tags = array(); + $size = getimagesize($photo->file_path(), $info); + if (is_array($info) && !empty($info["APP13"])) { + $iptc = iptcparse($info["APP13"]); + if (!empty($iptc["2#025"])) { + foreach($iptc["2#025"] as $tag) { + $tags[$tag]= 1; + } } } } |