aboutsummaryrefslogtreecommitdiff
path: root/mod/file/index.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/index.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/index.php')
-rw-r--r--mod/file/index.php69
1 files changed, 0 insertions, 69 deletions
diff --git a/mod/file/index.php b/mod/file/index.php
deleted file mode 100644
index 617e4c7f4..000000000
--- a/mod/file/index.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-/**
- * Individual's or group's files
- *
- * @package ElggFile
- */
-
-// access check for closed groups
-group_gatekeeper();
-
-$owner = elgg_get_page_owner_entity();
-
-elgg_push_breadcrumb(elgg_echo('file'), "file/all");
-elgg_push_breadcrumb($owner->name);
-
-$params = array();
-
-if ($owner->guid == elgg_get_logged_in_user_guid()) {
- // user looking at own files
- $title = elgg_echo('file:yours');
- $params['filter_context'] = 'mine';
-} else if (elgg_instanceof($owner, 'user')) {
- // someone else's files
- $title = elgg_echo("file:user", array($owner->name));
- // do not show button or select a tab when viewing someone else's posts
- $params['filter_context'] = 'none';
- $params['buttons'] = '';
-} else {
- // group files
- $title = elgg_echo("file:user", array($owner->name));
- $params['filter'] = '';
- if ($owner->isMember(elgg_get_logged_in_user_entity())) {
- $url = "file/add/$owner->guid";
- $vars = array(
- 'href' => $url,
- 'text' => elgg_echo("file:add"),
- 'class' => 'elgg-button elgg-button-action',
- );
- $button = elgg_view('output/url', $vars);
- $params['buttons'] = $button;
- } else {
- $params['buttons'] = '';
- }
-}
-
-// List files
-$content = elgg_list_entities(array(
- 'types' => 'object',
- 'subtypes' => 'file',
- 'container_guid' => $owner->guid,
- 'limit' => 10,
- 'full_view' => FALSE,
-));
-if (!$content) {
- $content = elgg_echo("file:none");
-}
-
-$sidebar = file_get_type_cloud(elgg_get_page_owner_guid());
-if (elgg_instanceof($owner, 'user')) {
- $sidebar .= elgg_view_latest_comments(elgg_get_page_owner_guid(), 'object', 'file');
-}
-
-$params['content'] = $content;
-$params['title'] = $title;
-$params['sidebar'] = $sidebar;
-
-$body = elgg_view_layout('content', $params);
-
-echo elgg_view_page($title, $body);