aboutsummaryrefslogtreecommitdiff
path: root/edit.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-02-25 12:16:53 +0000
committerCash Costello <cash.costello@gmail.com>2009-02-25 12:16:53 +0000
commit4e0c1576475390faa2f1fb4c4dc2902a953f440e (patch)
treecd3a47df019344d7f6c938ebe31c60cfa9b03677 /edit.php
downloadelgg-4e0c1576475390faa2f1fb4c4dc2902a953f440e.tar.gz
elgg-4e0c1576475390faa2f1fb4c4dc2902a953f440e.tar.bz2
First commit
Diffstat (limited to 'edit.php')
-rw-r--r--edit.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/edit.php b/edit.php
new file mode 100644
index 000000000..2c202e402
--- /dev/null
+++ b/edit.php
@@ -0,0 +1,46 @@
+<?php
+ /**
+ * Elgg file saver
+ *
+ * @package ElggFile
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+
+ gatekeeper();
+ set_context('photos');
+ $file = (int) get_input('file_guid');
+
+ if (!$file = get_entity($file))
+ forward();
+
+ if(!$file->canEdit())
+ forward();
+
+ $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);
+
+ $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);
+
+
+?> \ No newline at end of file