aboutsummaryrefslogtreecommitdiff
path: root/pages/upload.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-10-25 00:22:20 +0000
committerCash Costello <cash.costello@gmail.com>2010-10-25 00:22:20 +0000
commit893364a28955358ad259bfb75798560616ab3d49 (patch)
tree8b2ac2fb618596fed82b12c221eb7c485cbb9590 /pages/upload.php
parentda1493b95a2f0b5000a487ae373c9318c58d0b2d (diff)
downloadelgg-893364a28955358ad259bfb75798560616ab3d49.tar.gz
elgg-893364a28955358ad259bfb75798560616ab3d49.tar.bz2
supporting both basic and flash uploader
Diffstat (limited to 'pages/upload.php')
-rw-r--r--pages/upload.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/pages/upload.php b/pages/upload.php
index 8e15dd612..b6a828cf9 100644
--- a/pages/upload.php
+++ b/pages/upload.php
@@ -9,11 +9,13 @@ 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');
+$album_guid = (int) get_input('album_guid');
if (!$album_guid) {
forward();
}
+$uploader = get_input('uploader', 'ajax');
+
$album = get_entity($album_guid);
//if album does not exist or user does not have access
@@ -22,9 +24,8 @@ if (!$album || !$album->canEdit()) {
forward($_SERVER['HTTP_REFERER']);
}
-// set page owner based on container (user or group)
-$container = $album->container_guid;
-set_page_owner($container);
+// set page owner based on container (user or group)
+set_page_owner($album->container_guid);
$page_owner = page_owner_entity();
if ($page_owner instanceof ElggGroup) {
@@ -36,8 +37,11 @@ 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/ajax_upload", array('album' => $album_guid ) );
+if ($uploader == 'basic') {
+ $area2 .= elgg_view("tidypics/forms/upload", array('album' => $album));
+} else {
+ $area2 .= elgg_view("tidypics/forms/ajax_upload", array('album' => $album));
+}
$body = elgg_view_layout('two_column_left_sidebar', '', $area2);