diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/blog/actions/blog/delete.php | 6 | ||||
-rw-r--r-- | mod/file/actions/file/upload.php | 8 | ||||
-rw-r--r-- | mod/pages/actions/pages/delete.php | 6 |
3 files changed, 16 insertions, 4 deletions
diff --git a/mod/blog/actions/blog/delete.php b/mod/blog/actions/blog/delete.php index a4606f17f..64179e09c 100644 --- a/mod/blog/actions/blog/delete.php +++ b/mod/blog/actions/blog/delete.php @@ -12,7 +12,11 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) { $container = get_entity($blog->container_guid); if ($blog->delete()) { system_message(elgg_echo('blog:message:deleted_post')); - forward("pg/blog/owner/$container->username/"); + if (elgg_instanceof($container, 'group')) { + forward("pg/blog/group/$container->guid/owner"); + } else { + forward("pg/blog/owner/$container->username/"); + } } else { register_error(elgg_echo('blog:error:cannot_delete_post')); } 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 { diff --git a/mod/pages/actions/pages/delete.php b/mod/pages/actions/pages/delete.php index aea383ef8..927da1299 100644 --- a/mod/pages/actions/pages/delete.php +++ b/mod/pages/actions/pages/delete.php @@ -32,7 +32,11 @@ if ($page) { forward($parent->getURL()); } } - forward("pg/pages/owned/$container->username/"); + if (elgg_instanceof($container, 'group')) { + forward("pg/pages/group/$container->guid/owner"); + } else { + forward("pg/pages/owner/$container->username/"); + } } } } |