]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixed #2887 redirects on blog, file, and pages works now - bookmarks plugin still...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 12 Feb 2011 18:20:12 +0000 (18:20 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 12 Feb 2011 18:20:12 +0000 (18:20 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8167 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/blog/actions/blog/delete.php
mod/file/actions/file/upload.php
mod/pages/actions/pages/delete.php

index a4606f17f63b835498dab8155ef2b18b6a962574..64179e09c08a5c5f95d63f96bb12e0f212357dc5 100644 (file)
@@ -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'));
        }
index 1a30b6cefcf323190799c14dcdd5499f66895859..2749812d543523ca71c963b3c9ddbff6f3d74794 100644 (file)
@@ -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 {
index aea383ef8206ed3e682d644f0c0ba8d3f846b97b..927da1299f3a1d2ac9245a695c4c281adae2bf11 100644 (file)
@@ -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/");
+                       }
                }
        }
 }