Skip to content
This repository
Browse code

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
  • Loading branch information...
commit 7ef25d91cd64f29fb064b29d8695dc50e5c6054d 1 parent e4158cb
Cash Costello authored February 12, 2011
6  mod/blog/actions/blog/delete.php
@@ -12,7 +12,11 @@
12 12
 	$container = get_entity($blog->container_guid);
13 13
 	if ($blog->delete()) {
14 14
 		system_message(elgg_echo('blog:message:deleted_post'));
15  
-		forward("pg/blog/owner/$container->username/");
  15
+		if (elgg_instanceof($container, 'group')) {
  16
+			forward("pg/blog/group/$container->guid/owner");
  17
+		} else {
  18
+			forward("pg/blog/owner/$container->username/");
  19
+		}
16 20
 	} else {
17 21
 		register_error(elgg_echo('blog:error:cannot_delete_post'));
18 22
 	}
8  mod/file/actions/file/upload.php
@@ -185,8 +185,12 @@
185 185
 	}
186 186
 
187 187
 	if (!$ajax) {
188  
-		$container_user = get_entity($container_guid);
189  
-		forward(elgg_get_site_url() . "pg/file/" . $container_user->username);
  188
+		$container = get_entity($container_guid);
  189
+		if (elgg_instanceof($container, 'group')) {
  190
+			forward("pg/file/group/$container->guid/owner");
  191
+		} else {
  192
+			forward("pg/file/owner/$container->username");
  193
+		}
190 194
 	}
191 195
 
192 196
 } else {
6  mod/pages/actions/pages/delete.php
@@ -32,7 +32,11 @@
32 32
 					forward($parent->getURL());
33 33
 				}
34 34
 			}
35  
-			forward("pg/pages/owned/$container->username/");
  35
+			if (elgg_instanceof($container, 'group')) {
  36
+				forward("pg/pages/group/$container->guid/owner");
  37
+			} else {
  38
+				forward("pg/pages/owner/$container->username/");
  39
+			}
36 40
 		}
37 41
 	}
38 42
 }

0 notes on commit 7ef25d9

Please sign in to comment.
Something went wrong with that request. Please try again.