aboutsummaryrefslogtreecommitdiff
path: root/mod/file
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-12-13 03:22:22 +0100
committerSem <sembrestels@riseup.net>2012-12-13 03:22:22 +0100
commit22a0edfb63d91074136067a163ee7cf7363b269f (patch)
treed4e6a25eb1acb42d5a9e9f184e0c216b1bf47f5f /mod/file
parent6623571b615fc5c9d1b82e2607de4cdaee8a818b (diff)
downloadelgg-22a0edfb63d91074136067a163ee7cf7363b269f.tar.gz
elgg-22a0edfb63d91074136067a163ee7cf7363b269f.tar.bz2
Improving file 1.7 url compatibility.
Diffstat (limited to 'mod/file')
-rw-r--r--mod/file/start.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/file/start.php b/mod/file/start.php
index 172042332..cff09bd1e 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -121,8 +121,12 @@ function file_page_handler($page) {
file_register_toggle();
include "$file_dir/friends.php";
break;
- case 'view':
case 'read': // Elgg 1.7 compatibility
+ $entity = get_entity((int) $page[1]);
+ if ($entity) {
+ elgg_set_page_owner_guid($entity->getContainerGUID());
+ }
+ case 'view':
set_input('guid', $page[1]);
include "$file_dir/view.php";
break;