aboutsummaryrefslogtreecommitdiff
path: root/pages/upload.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-07-25 02:01:36 +0000
committerCash Costello <cash.costello@gmail.com>2010-07-25 02:01:36 +0000
commit73403645808a81425381f43c25e0ea2c92705312 (patch)
tree83fb73e9a122054f6f4c2e1c44e399572ee13e28 /pages/upload.php
parent791ec4925346cb38ecca9a2f2574b012ab64a88a (diff)
downloadelgg-73403645808a81425381f43c25e0ea2c92705312.tar.gz
elgg-73403645808a81425381f43c25e0ea2c92705312.tar.bz2
first go at brining tidypics up to code standards
Diffstat (limited to 'pages/upload.php')
-rw-r--r--pages/upload.php82
1 files changed, 41 insertions, 41 deletions
diff --git a/pages/upload.php b/pages/upload.php
index 5c123537e..6f8db288d 100644
--- a/pages/upload.php
+++ b/pages/upload.php
@@ -1,44 +1,44 @@
<?php
- /**
- * Tidypics Upload Images Page
- *
- */
-
- include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
-
- // must be logged in to upload images
- gatekeeper();
-
- $album_guid = (int) get_input('container_guid');
- if (!$album_guid)
- forward();
-
- $album = get_entity($album_guid);
-
- //if album does not exist or user does not have access
- if (!$album || !$album->canEdit()) {
- // throw warning and forward to previous page
- forward($_SERVER['HTTP_REFERER']);
- }
-
- // set page owner based on container (user or group)
- $container = $album->container_guid;
- set_page_owner($container);
-
- $page_owner = page_owner_entity();
- if ($page_owner instanceof ElggGroup) {
- add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
- $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
- }
-
- set_context('photos');
- $title = elgg_echo('album:addpix') . ': ' . $album->title;
- $area2 .= elgg_view_title($title);
-
- $area2 .= elgg_view("tidypics/forms/upload", array('album' => $album_guid ) );
+/**
+ * Tidypics Upload Images Page
+ *
+ */
+
+include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
+
+// must be logged in to upload images
+gatekeeper();
+
+$album_guid = (int) get_input('container_guid');
+if (!$album_guid) {
+ forward();
+}
+
+$album = get_entity($album_guid);
+
+//if album does not exist or user does not have access
+if (!$album || !$album->canEdit()) {
+ // throw warning and forward to previous page
+ forward($_SERVER['HTTP_REFERER']);
+}
+
+// set page owner based on container (user or group)
+$container = $album->container_guid;
+set_page_owner($container);
+
+$page_owner = page_owner_entity();
+if ($page_owner instanceof ElggGroup) {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
+}
+
+set_context('photos');
+$title = elgg_echo('album:addpix') . ': ' . $album->title;
+$area2 .= elgg_view_title($title);
+
+$area2 .= elgg_view("tidypics/forms/upload", array('album' => $album_guid ) );
// $area2 .= elgg_view("tidypics/forms/flash_upload", array('album' => $album_guid ) );
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
-
- page_draw($title, $body);
-?> \ No newline at end of file
+$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
+
+page_draw($title, $body);