From fbdaf2a33386e6746be4de50a0b4aceb06ff5e68 Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 2 Jan 2012 14:34:58 -0500 Subject: displaying the tag on the photo but not a label for the tag --- classes/TidypicsImage.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'classes/TidypicsImage.php') diff --git a/classes/TidypicsImage.php b/classes/TidypicsImage.php index 49585fd0c..7eca2f7c3 100644 --- a/classes/TidypicsImage.php +++ b/classes/TidypicsImage.php @@ -341,15 +341,16 @@ class TidypicsImage extends ElggFile { * @return array of json representations of the tags and the tag link text */ public function getPhotoTags() { - global $CONFIG; - // get tags as annotations - $photo_tags = get_annotations($this->getGUID(), 'object', 'image', 'phototag'); - if (!$photo_tags) { - // no tags or user doesn't have permission to tags, so return - return false; + $tags = array(); + $annotations = get_annotations($this->getGUID(), 'object', 'image', 'phototag'); + foreach ($annotations as $annotation) { + $tags[] = unserialize($annotation->value); } + return $tags; + + /* $photo_tags_json = "["; foreach ($photo_tags as $p) { $photo_tag = unserialize($p->value); @@ -385,6 +386,7 @@ class TidypicsImage extends ElggFile { $ret_data = array('json' => $photo_tags_json, 'links' => $photo_tag_links); return $ret_data; + */ } /** -- cgit v1.2.3