From 450b57bc95f405aebb1dc110bafc1b5def5041f4 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 21 Mar 2009 15:57:48 +0000 Subject: code cleanup --- view.php | 76 ++++++++++++++++++++++++++++++---------------------------------- 1 file changed, 35 insertions(+), 41 deletions(-) (limited to 'view.php') diff --git a/view.php b/view.php index e0121baae..60fb47864 100644 --- a/view.php +++ b/view.php @@ -1,62 +1,56 @@ container_guid)->container_guid; - - if ($top_container) { - set_page_owner($top_container); - } else { - set_page_owner($entity->owner_guid); - } + //set "real" container - image container is the album , group/user is the album container + $top_container = get_entity($entity->container_guid)->container_guid; + + if ($top_container) { + set_page_owner($top_container); + } else { + set_page_owner($entity->owner_guid); + } // Set the body to be the full view of the entity, and the title to be its title - $area2 = elgg_view_entity($entity,true); - if ($shell) { - $body = elgg_view_layout('two_column_left_sidebar', '', $area1 . $area2); - } else { - $body = $area2; - } - - } else { - $body = elgg_echo('notfound'); - } - - // Display the page + $area2 = elgg_view_entity($entity,true); if ($shell) { - page_draw("", $body); + $body = elgg_view_layout('two_column_left_sidebar', '', $area1 . $area2); } else { - header("Content-type: text/html; charset=UTF-8"); - echo $body; + $body = $area2; } + } else { + $body = elgg_echo('notfound'); + } + + // Display the page + if ($shell) { + page_draw("", $body); + } else { + header("Content-type: text/html; charset=UTF-8"); + echo $body; + } + ?> \ No newline at end of file -- cgit v1.2.3