aboutsummaryrefslogtreecommitdiff
path: root/views/default/object
diff options
context:
space:
mode:
authorGreg Froese <greg.froese@gmail.com>2009-05-10 23:36:42 +0000
committerGreg Froese <greg.froese@gmail.com>2009-05-10 23:36:42 +0000
commit0911bafdcddddd2104e696e6fb44cd77247ade7b (patch)
treecc668805470738d0b4edde0b39778e297598d51c /views/default/object
parentfe1cce6c8cbf2ee781619ff21b571518aa1a28e9 (diff)
downloadelgg-0911bafdcddddd2104e696e6fb44cd77247ade7b.tar.gz
elgg-0911bafdcddddd2104e696e6fb44cd77247ade7b.tar.bz2
adding in most viewed and recent images pages
Diffstat (limited to 'views/default/object')
-rw-r--r--views/default/object/image.php29
1 files changed, 15 insertions, 14 deletions
diff --git a/views/default/object/image.php b/views/default/object/image.php
index 8fd4dca9a..09a121256 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -179,22 +179,23 @@ if ($photo_tags) {
<?php
$viewer = get_loggedin_user();
- $friends = get_entities_from_relationship('friend', $viewer->getGUID(), false, 'user', '', 0);
-
- $content = "<input type='hidden' name='image_guid' value='{$file_guid}' />";
- $content .= "<input type='hidden' name='coordinates' id='coordinates' value='' />";
- $content .= "<input type='hidden' name='user_id' id='user_id' value='' />";
- $content .= "<input type='hidden' name='word' id='word' value='' />";
-
- $content .= "<ul id='phototagging-menu'>";
- $content .= "<li><a href='javascript:void(0)' onClick='selectUser({$viewer->getGUID()},\"{$viewer->name}\")'> {$viewer->name} (" . elgg_echo('me') . ")</a></li>";
-
- if ($friends) {
- foreach($friends as $friend) {
- $content .= "<li><a href='javascript:void(0)' onClick='selectUser({$friend->getGUID()}, \"{$friend->name}\")'>{$friend->name}</a></li>";
+ if($viewer) {
+ $friends = get_entities_from_relationship('friend', $viewer->getGUID(), false, 'user', '', 0);
+
+ $content = "<input type='hidden' name='image_guid' value='{$file_guid}' />";
+ $content .= "<input type='hidden' name='coordinates' id='coordinates' value='' />";
+ $content .= "<input type='hidden' name='user_id' id='user_id' value='' />";
+ $content .= "<input type='hidden' name='word' id='word' value='' />";
+
+ $content .= "<ul id='phototagging-menu'>";
+ $content .= "<li><a href='javascript:void(0)' onClick='selectUser({$viewer->getGUID()},\"{$viewer->name}\")'> {$viewer->name} (" . elgg_echo('me') . ")</a></li>";
+
+ if ($friends) {
+ foreach($friends as $friend) {
+ $content .= "<li><a href='javascript:void(0)' onClick='selectUser({$friend->getGUID()}, \"{$friend->name}\")'>{$friend->name}</a></li>";
+ }
}
}
-
$content .= "</ul>";
$content .= "<fieldset><button class='submit_button' type='submit'>" . elgg_echo('tidypics:actiontag') . "</button></fieldset>";