aboutsummaryrefslogtreecommitdiff
path: root/mod/file/world.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/world.php')
-rw-r--r--mod/file/world.php61
1 files changed, 25 insertions, 36 deletions
diff --git a/mod/file/world.php b/mod/file/world.php
index 3bacaad00..1b8f5f828 100644
--- a/mod/file/world.php
+++ b/mod/file/world.php
@@ -1,40 +1,29 @@
<?php
- /**
- * Elgg file browser
- *
- * @package ElggFile
- */
+/**
+ * All files
+ *
+ * @package ElggFile
+ */
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- $limit = get_input("limit", 10);
- $offset = get_input("offset", 0);
-
- // Get the current page's owner
- $page_owner = elgg_get_page_owner();
- if ($page_owner === false || is_null($page_owner)) {
- $page_owner = get_loggedin_user();
- set_page_owner(get_loggedin_userid());
- }
-
- $title = elgg_echo('file:all');
-
- // Get objects
- $area1 = elgg_view('page/elements/content_header', array('context' => "everyone", 'type' => 'file'));
- $area1 .= get_filetype_cloud(); // the filter
- elgg_push_context('search');
- $area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
- elgg_pop_context();
+elgg_push_breadcrumb(elgg_echo('file'));
- //get the latest comments on all files
- $comments = get_annotations(0, "object", "file", "generic_comment", "", 0, 4, 0, "desc");
- $area3 = elgg_view('comments/latest', array('comments' => $comments));
-
- $content = "<div class='files'>".$area1.$area2."</div>";
- $params = array(
- 'content' => $content,
- 'sidebar' => $area3
- );
- $body = elgg_view_layout('one_column_with_sidebar', $params);
+$limit = get_input("limit", 10);
- echo elgg_view_page($title, $body);
+$title = elgg_echo('file:all');
+
+elgg_push_context('search');
+$content = elgg_list_entities(array(
+ 'types' => 'object',
+ 'subtypes' => 'file',
+ 'limit' => $limit,
+ 'full_view' => FALSE
+));
+elgg_pop_context();
+
+$body = elgg_view_layout('content', array(
+ 'filter_context' => 'all',
+ 'content' => $content,
+ 'title' => $title,
+));
+
+echo elgg_view_page($title, $body);