aboutsummaryrefslogtreecommitdiff
path: root/mod/file
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file')
-rw-r--r--mod/file/friends.php5
-rw-r--r--mod/file/index.php5
-rw-r--r--mod/file/search.php5
-rw-r--r--mod/file/start.php2
-rw-r--r--mod/file/views/default/object/file.php2
-rw-r--r--mod/file/world.php4
6 files changed, 12 insertions, 11 deletions
diff --git a/mod/file/friends.php b/mod/file/friends.php
index 038d7efa2..f76c4e692 100644
--- a/mod/file/friends.php
+++ b/mod/file/friends.php
@@ -15,10 +15,11 @@
$title = sprintf(elgg_echo("file:friends"),$owner->name);
$area1 = elgg_view('page_elements/content_header', array('context' => "friends", 'type' => 'file'));
- set_context('search');
+ elgg_push_context('search');
// offset is grabbed in list_user_friends_objects
$content = list_user_friends_objects($owner->guid, 'file', 10, false);
- set_context('file');
+ elgg_pop_context();
+
$area1 .= get_filetype_cloud($owner->guid, true);
// handle case where friends don't have any files
diff --git a/mod/file/index.php b/mod/file/index.php
index 7fb246367..2a82ee1e4 100644
--- a/mod/file/index.php
+++ b/mod/file/index.php
@@ -23,10 +23,11 @@
}
// Get objects
- set_context('search');
+ elgg_push_context('search');
$offset = (int)get_input('offset', 0);
$area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'container_guid' => elgg_get_page_owner_guid(), 'limit' => 10, 'offset' => $offset, 'full_view' => FALSE));
- set_context('file');
+ elgg_pop_context();
+
$get_filter = get_filetype_cloud(elgg_get_page_owner_guid());
if ($get_filter) {
$area1 .= $get_filter;
diff --git a/mod/file/search.php b/mod/file/search.php
index 6568eae79..e92cf0362 100644
--- a/mod/file/search.php
+++ b/mod/file/search.php
@@ -69,8 +69,7 @@
$area1 = get_filetype_cloud();
}
- // Set context
- set_context('search');
+ elgg_push_context('search');
$offset = (int)get_input('offset', 0);
$limit = 10;
@@ -89,7 +88,7 @@
$area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'owner_guid' => $owner_guid, 'limit' => $limit, 'offset' => $offset));
}
- set_context("file");
+ elgg_pop_context();
$content = "<div class='files'>".$area1.$area2."</div>";
diff --git a/mod/file/start.php b/mod/file/start.php
index 544024d49..3d66dcc21 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -77,7 +77,7 @@
$page_owner = elgg_get_page_owner();
// Group submenu option
- if ($page_owner instanceof ElggGroup && get_context() == "groups") {
+ if ($page_owner instanceof ElggGroup && elgg_get_context() == "groups") {
if($page_owner->file_enable != "no"){
add_submenu_item(sprintf(elgg_echo("file:group"),$page_owner->name), $CONFIG->wwwroot . "pg/file/" . $page_owner->username);
}
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index 2511f5af6..5858a1f1e 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -22,7 +22,7 @@
$title = elgg_echo('untitled');
}
- if (get_context() == "search") { // Start search listing version
+ if (elgg_get_context() == "search") { // Start search listing version
if (get_input('search_viewtype') == "gallery") {
echo "<div class='filerepo_gallery_item'>";
diff --git a/mod/file/world.php b/mod/file/world.php
index 0fa2a2ead..a3d78ef7b 100644
--- a/mod/file/world.php
+++ b/mod/file/world.php
@@ -22,9 +22,9 @@
// Get objects
$area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'file'));
$area1 .= get_filetype_cloud(); // the filter
- set_context('search');
+ elgg_push_context('search');
$area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
- set_context('file');
+ elgg_pop_context();
//get the latest comments on all files
$comments = get_annotations(0, "object", "file", "generic_comment", "", 0, 4, 0, "desc");