aboutsummaryrefslogtreecommitdiff
path: root/edit.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-03-21 16:57:57 +0000
committerCash Costello <cash.costello@gmail.com>2009-03-21 16:57:57 +0000
commitac0e60fd90c55a3a7d4f2001eb9e4cce44a5b259 (patch)
treebe51851578c3c7cffe0ad6c7bd3dda379ed2bbb3 /edit.php
parentfd2278f46e5123c43343f57cf764d45a0b57ec24 (diff)
downloadelgg-ac0e60fd90c55a3a7d4f2001eb9e4cce44a5b259.tar.gz
elgg-ac0e60fd90c55a3a7d4f2001eb9e4cce44a5b259.tar.bz2
cleaning up friends album view and individual album view
Diffstat (limited to 'edit.php')
-rw-r--r--edit.php45
1 files changed, 21 insertions, 24 deletions
diff --git a/edit.php b/edit.php
index 4e6d0d2ec..3e597cf05 100644
--- a/edit.php
+++ b/edit.php
@@ -10,33 +10,30 @@
set_context('photos');
$file = (int) get_input('file_guid');
- if (!$file = get_entity($file))
- forward();
+ if (!$file = get_entity($file))
+ forward();
- if(!$file->canEdit())
- forward();
+ if (!$file->canEdit())
+ forward();
- $subtype = $file->getSubtype();
+ $subtype = $file->getSubtype();
- if($subtype == 'album'){
- if($container = $file->container_guid)
- set_page_owner($container);
-
- $area2 .= elgg_view_title($title = elgg_echo('album:edit'));
- }
- elseif($subtype == 'image'){
- if($container = get_entity($file->container_guid)->container_guid)
- set_page_owner($container);
+ if ($subtype == 'album') {
+ if($container = $file->container_guid)
+ set_page_owner($container);
- $area2 .= elgg_view_title($title = elgg_echo('image:edit'));
- }
- else{
- forward();
- }
-
- $area2 .= elgg_view("tidypics/forms/edit",array('entity' => $file, 'subtype' => $subtype));
- $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
- page_draw(elgg_echo("edit"), $body);
-
+ $title = elgg_echo('album:edit');
+ } else if ($subtype == 'image') {
+ if ($container = get_entity($file->container_guid)->container_guid)
+ set_page_owner($container);
+
+ $title = elgg_echo('image:edit');
+ } else {
+ forward();
+ }
+ $area2 .= elgg_view_title($title);
+ $area2 .= elgg_view('tidypics/forms/edit', array('entity' => $file, 'subtype' => $subtype));
+ $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
+ page_draw($title, $body);
?> \ No newline at end of file