aboutsummaryrefslogtreecommitdiff
path: root/pages/photos/owner.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/photos/owner.php')
-rw-r--r--pages/photos/owner.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/pages/photos/owner.php b/pages/photos/owner.php
index f6582e326..214cd2e37 100644
--- a/pages/photos/owner.php
+++ b/pages/photos/owner.php
@@ -35,11 +35,22 @@ elgg_pop_context();
elgg_register_title_button();
-$body = elgg_view_layout('content', array(
+$params = array(
'filter_context' => 'mine',
'content' => $content,
'title' => $title,
'sidebar' => elgg_view('tidypics/sidebar', array('page' => 'owner')),
-));
+);
+
+// don't show filter if out of filter context
+if ($owner instanceof ElggGroup) {
+ $params['filter'] = false;
+}
+
+if ($owner->getGUID() != elgg_get_logged_in_user_guid()) {
+ $params['filter_context'] = '';
+}
+
+$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);