From 7ef25d91cd64f29fb064b29d8695dc50e5c6054d Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 12 Feb 2011 18:20:12 +0000 Subject: Fixed #2887 redirects on blog, file, and pages works now - bookmarks plugin still needs plenty of work git-svn-id: http://code.elgg.org/elgg/trunk@8167 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/file/actions/file/upload.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mod/file/actions/file/upload.php') diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php index 1a30b6cef..2749812d5 100644 --- a/mod/file/actions/file/upload.php +++ b/mod/file/actions/file/upload.php @@ -185,8 +185,12 @@ if ($new_file) { } if (!$ajax) { - $container_user = get_entity($container_guid); - forward(elgg_get_site_url() . "pg/file/" . $container_user->username); + $container = get_entity($container_guid); + if (elgg_instanceof($container, 'group')) { + forward("pg/file/group/$container->guid/owner"); + } else { + forward("pg/file/owner/$container->username"); + } } } else { -- cgit v1.2.3