aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-03-06 22:35:15 +0000
committerCash Costello <cash.costello@gmail.com>2010-03-06 22:35:15 +0000
commit8f6d4a6a36a9f00242ffe368a3d9e306c7e3a837 (patch)
treede68df99b89fc1671ae63b9d5adf7d238532dcba /lib
parent4ea3fc8331ff29abc55c3c7f082a6d8c7110b21c (diff)
downloadelgg-8f6d4a6a36a9f00242ffe368a3d9e306c7e3a837.tar.gz
elgg-8f6d4a6a36a9f00242ffe368a3d9e306c7e3a837.tar.bz2
fixed bug with delete tags menu item
Diffstat (limited to 'lib')
-rw-r--r--lib/image.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/image.php b/lib/image.php
index 0c4049183..183d03c1c 100644
--- a/lib/image.php
+++ b/lib/image.php
@@ -27,10 +27,11 @@
public function isPhotoTagged()
{
$num_tags = count_annotations($this->getGUID(), 'object', 'image', 'phototag');
- if ($num_tags > 0)
+ if ($num_tags > 0) {
return true;
- else
+ } else {
return false;
+ }
}
/**
@@ -61,10 +62,11 @@
if ($photo_tag->type === 'user')
{
$user = get_entity($photo_tag->value);
- if ($user)
+ if ($user) {
$phototag_text = $user->name;
- else
+ } else {
$phototag_text = "unknown user";
+ }
$phototag_link = $CONFIG->wwwroot . "pg/photos/tagged/" . $photo_tag->value;
}
@@ -73,8 +75,9 @@
// hack to handle format of Pedro Prez's tags - ugh
$photo_tag->coords = "\"x1\":\"{$photo_tag->x1}\",\"y1\":\"{$photo_tag->y1}\",\"width\":\"{$photo_tag->width}\",\"height\":\"{$photo_tag->height}\"";
$photo_tags_json .= '{' . $photo_tag->coords . ',"text":"' . $phototag_text . '","id":"' . $p->id . '"},';
- } else
+ } else {
$photo_tags_json .= '{' . $photo_tag->coords . ',"text":"' . $phototag_text . '","id":"' . $p->id . '"},';
+ }
// prepare variable arrays for tagging view
$photo_tag_links[$p->id] = array('text' => $phototag_text, 'url' => $phototag_link);
@@ -115,8 +118,9 @@
$my_views = 0;
foreach ($views as $view)
{
- if ($view->owner_guid == $viewer_guid)
+ if ($view->owner_guid == $viewer_guid) {
$my_views++;
+ }
}
}
@@ -138,8 +142,9 @@
*/
public function addView($viewer_guid)
{
- if ($viewer_guid != $this->owner_guid && tp_is_person())
+ if ($viewer_guid != $this->owner_guid && tp_is_person()) {
create_annotation($this->getGUID(), "tp_view", "1", "integer", $viewer_guid, ACCESS_PUBLIC);
+ }
}
}