aboutsummaryrefslogtreecommitdiff
path: root/mod/file/upload.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-01 17:55:18 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-01 17:55:18 +0000
commit7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52 (patch)
tree1070be6b85c5a2327163cb0326dfbcbc62f10d62 /mod/file/upload.php
parent07ffe6464b453fd90cd2833fc55f804c57c52b4a (diff)
downloadelgg-7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52.tar.gz
elgg-7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52.tar.bz2
almost finished updating the file plugin to work with new html/css
git-svn-id: http://code.elgg.org/elgg/trunk@7804 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/upload.php')
-rw-r--r--mod/file/upload.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/mod/file/upload.php b/mod/file/upload.php
index ef0899f20..f5fab81f4 100644
--- a/mod/file/upload.php
+++ b/mod/file/upload.php
@@ -5,32 +5,35 @@
* @package ElggFile
*/
+elgg_load_library('elgg:file');
+
elgg_set_page_owner_guid(get_input('guid'));
$owner = elgg_get_page_owner();
gatekeeper();
group_gatekeeper();
+$title = elgg_echo('file:new');
+
+// set up breadcrumbs
elgg_push_breadcrumb(elgg_echo('file'), "pg/file/all/");
if (elgg_instanceof($owner, 'user')) {
elgg_push_breadcrumb($owner->name, "pg/file/owner/$owner->username");
} else {
elgg_push_breadcrumb($owner->name, "pg/file/group/$owner->guid/owner");
}
-elgg_push_breadcrumb(elgg_echo('file:new'));
-
-$container_guid = elgg_get_page_owner_guid();
-
-$title = elgg_echo('file:upload');
+elgg_push_breadcrumb($title);
-$content = elgg_view_title($title);
+// create form
+$form_vars = array('enctype' => 'multipart/form-data');
+$body_vars = file_prepare_form_vars();
+$content = elgg_view_form('file/upload', $form_vars, $body_vars);
-$content .= elgg_view("file/upload", array('container_guid' => $container_guid));
$body = elgg_view_layout('content', array(
'content' => $content,
'title' => $title,
'filter' => '',
- 'header' => '',
+ 'buttons' => '',
));
echo elgg_view_page($title, $body);