aboutsummaryrefslogtreecommitdiff
path: root/mod/pages
diff options
context:
space:
mode:
Diffstat (limited to 'mod/pages')
-rw-r--r--mod/pages/actions/pages/delete.php6
-rw-r--r--mod/pages/views/default/river/object/page/create.php2
2 files changed, 4 insertions, 4 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/");
}
}
diff --git a/mod/pages/views/default/river/object/page/create.php b/mod/pages/views/default/river/object/page/create.php
index 728978178..d182a1ebe 100644
--- a/mod/pages/views/default/river/object/page/create.php
+++ b/mod/pages/views/default/river/object/page/create.php
@@ -16,7 +16,7 @@ $string = sprintf(elgg_echo("pages:river:created"),$url) . " ";
$string .= elgg_echo("pages:river:create") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a> <span class='entity_subtext'>". elgg_view_friendly_time($object->time_created) ."</span> <a class='river_comment_form_button link'>Comment</a>";
$string .= elgg_view('likes/forms/link', array('entity' => $object));
$string .= "<div class=\"river_content_display\">";
-$string .= elgg_make_excerpt($contents, 200);
+$string .= elgg_get_excerpt($contents, 200);
$string .= "</div>";
echo $string;