diff options
Diffstat (limited to 'mod/file/upload.php')
-rw-r--r-- | mod/file/upload.php | 19 |
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); |