aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/actions
diff options
context:
space:
mode:
Diffstat (limited to 'mod/pages/actions')
-rw-r--r--mod/pages/actions/pages/delete.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/mod/pages/actions/pages/delete.php b/mod/pages/actions/pages/delete.php
index 1ce30472c..ab28e23b6 100644
--- a/mod/pages/actions/pages/delete.php
+++ b/mod/pages/actions/pages/delete.php
@@ -11,6 +11,8 @@ if ($page = get_entity($page)) {
if ($page->canEdit()) {
+ $container = get_entity($page->container_guid);
+
// Bring all child elements forward
$parent = $page->parent_guid;
if ($children = elgg_get_entities_from_metadata(array('metadata_name' => 'parent_guid', 'metadata_value' => $page->getGUID()))) {
@@ -23,11 +25,9 @@ if ($page = get_entity($page)) {
if ($parent) {
if ($parent = get_entity($parent)) {
forward($parent->getURL());
- exit;
}
}
- forward('pg/pages/owned/' . $_SESSION['user']->username);
- exit;
+ forward("pg/pages/owned/$container->username/");
}
}