diff options
Diffstat (limited to 'mod/file/upload.php')
-rw-r--r-- | mod/file/upload.php | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/mod/file/upload.php b/mod/file/upload.php index 2040c7240..0c89e64a5 100644 --- a/mod/file/upload.php +++ b/mod/file/upload.php @@ -1,24 +1,30 @@ <?php - /** - * Elgg file browser uploader - * - * @package ElggFile - */ - - require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); - - gatekeeper(); - if (is_callable('group_gatekeeper')) { - group_gatekeeper(); - } - - // Render the file upload page - - $container_guid = elgg_get_page_owner_guid(); - $area1 = elgg_view_title($title = elgg_echo('file:upload')); - $area1 .= elgg_view("file/upload", array('container_guid' => $container_guid)); - $body = elgg_view_layout('one_column_with_sidebar', array('content' => $area1)); - - echo elgg_view_page(elgg_echo("file:upload"), $body); - -?>
\ No newline at end of file +/** + * Upload a new file + * + * @package ElggFile + */ + +elgg_set_page_owner_guid(get_input('guid')); + +gatekeeper(); +group_gatekeeper(); + +elgg_push_breadcrumb(elgg_echo('file'), "pg/file/all/"); +elgg_push_breadcrumb(elgg_echo('file:new')); + +$container_guid = elgg_get_page_owner_guid(); + +$title = elgg_echo('file:upload'); + +$content = elgg_view_title($title); + +$content .= elgg_view("file/upload", array('container_guid' => $container_guid)); +$body = elgg_view_layout('content', array( + 'content' => $content, + 'title' => $title, + 'filter' => '', + 'header' => '', +)); + +echo elgg_view_page($title, $body); |