aboutsummaryrefslogtreecommitdiff
path: root/mod/file/search.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-19 14:58:46 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-19 14:58:46 +0000
commitee47fbf70fc7f67efde6926237e13fc20a664a72 (patch)
treef1c5430539b3acf9dfb708595f42f29f57aa17de /mod/file/search.php
parent52f127f23c21675ff7e0d35f1a94741c77e3ed52 (diff)
downloadelgg-ee47fbf70fc7f67efde6926237e13fc20a664a72.tar.gz
elgg-ee47fbf70fc7f67efde6926237e13fc20a664a72.tar.bz2
Refs #3158 namespace file plugin's page scripts
git-svn-id: http://code.elgg.org/elgg/trunk@8766 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/search.php')
-rw-r--r--mod/file/search.php98
1 files changed, 0 insertions, 98 deletions
diff --git a/mod/file/search.php b/mod/file/search.php
deleted file mode 100644
index bcaa2cad9..000000000
--- a/mod/file/search.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-/**
- * List files by type
- *
- * @package ElggFile
-
- */
-// Load Elgg engine
-require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
-$page_owner_guid = get_input('page_owner', null);
-if ($page_owner_guid) {
- elgg_set_page_owner_guid($page_owner_guid);
-}
-$owner = elgg_get_page_owner_entity();
-
-group_gatekeeper();
-
-// Get input
-$md_type = 'simpletype';
-$tag = get_input('tag');
-$listtype = get_input('listtype');
-$friends = get_input('friends', false);
-
-
-// breadcrumbs
-elgg_push_breadcrumb(elgg_echo('file'), "file/all");
-if ($owner) {
- if (elgg_instanceof($owner, 'user')) {
- elgg_push_breadcrumb($owner->name, "file/owner/$owner->username");
- } else {
- elgg_push_breadcrumb($owner->name, "file/group/$owner->guid/owner");
- }
-}
-if ($friends && $owner) {
- elgg_push_breadcrumb(elgg_echo('friends'), "file/friends/$owner->username");
-}
-if ($tag) {
- elgg_push_breadcrumb(elgg_echo("file:type:$tag"));
-} else {
- elgg_push_breadcrumb(elgg_echo('all'));
-}
-
-// title
-if (!$owner) {
- // world files
- $title = elgg_echo('all') . ' ' . elgg_echo("file:type:$tag");
-} else {
- $friend_string = $friends ? elgg_echo('file:title:friends') : '';
- $type_string = elgg_echo("file:type:$tag");
- $title = elgg_echo('file:list:title', array($owner->name, $friend_string, $type_string));
-}
-
-
-$sidebar = file_get_type_cloud($page_owner_guid, $friends);
-
-if ($friends) {
- // elgg_does not support getting objects that belong to an entity's friends
- $friend_entities = get_user_friends($page_owner_guid, "", 999999, 0);
- if ($friend_entities) {
- $friend_guids = array();
- foreach ($friend_entities as $friend) {
- $friend_guids[] = $friend->getGUID();
- }
- }
- $page_owner_guid = $friend_guids;
-}
-
-$limit = 10;
-if ($listtype == "gallery") {
- $limit = 12;
-}
-
-$params = array(
- 'types' => 'object',
- 'subtypes' => 'file',
- 'container_guid' => $page_owner_guid,
- 'limit' => $limit,
- 'full_view' => false,
-);
-
-if ($tag) {
- $params['metadata_name'] = $md_type;
- $params['metadata_value'] = $tag;
- $content = elgg_list_entities_from_metadata($params);
-} else {
- $content = elgg_list_entities($params);
-}
-
-$body = elgg_view_layout('content', array(
- 'filter' => '',
- 'buttons' => '',
- 'content' => $content,
- 'title' => $title,
- 'sidebar' => $sidebar,
-));
-
-echo elgg_view_page($title, $body); \ No newline at end of file