diff options
author | cash <cash.costello@gmail.com> | 2012-01-02 14:34:58 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2012-01-02 14:34:58 -0500 |
commit | fbdaf2a33386e6746be4de50a0b4aceb06ff5e68 (patch) | |
tree | 7dd062f7ab03b565dc768a46b1df089e03fbad9f /classes/TidypicsImage.php | |
parent | 20ab73de5248b3418bbbad27850e3d3e093c473c (diff) | |
download | elgg-fbdaf2a33386e6746be4de50a0b4aceb06ff5e68.tar.gz elgg-fbdaf2a33386e6746be4de50a0b4aceb06ff5e68.tar.bz2 |
displaying the tag on the photo but not a label for the tag
Diffstat (limited to 'classes/TidypicsImage.php')
-rw-r--r-- | classes/TidypicsImage.php | 14 |
1 files changed, 8 insertions, 6 deletions
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; + */ } /** |