aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/actions/blog/auto_save_revision.php2
-rw-r--r--mod/blog/actions/blog/delete.php2
-rw-r--r--mod/blog/actions/blog/save.php4
-rw-r--r--mod/bookmarks/actions/delete.php7
-rw-r--r--mod/embed/views/default/embed/item/gallery.php2
-rw-r--r--mod/embed/views/default/embed/item/list.php2
-rw-r--r--mod/file/actions/delete.php2
-rw-r--r--mod/groups/views/default/river/forum/create.php2
-rw-r--r--mod/groups/views/default/river/forum/topic/create.php2
-rw-r--r--mod/pages/actions/pages/delete.php6
-rw-r--r--mod/pages/views/default/river/object/page/create.php2
-rw-r--r--mod/reportedcontent/views/default/admin/overview/reportedcontent.php3
-rw-r--r--mod/riverdashboard/endpoint/get_comments.php2
-rw-r--r--mod/riverdashboard/views/default/river/item/wrapper.php2
14 files changed, 20 insertions, 20 deletions
diff --git a/mod/blog/actions/blog/auto_save_revision.php b/mod/blog/actions/blog/auto_save_revision.php
index 00b24acce..9d5fe3ea7 100644
--- a/mod/blog/actions/blog/auto_save_revision.php
+++ b/mod/blog/actions/blog/auto_save_revision.php
@@ -41,7 +41,7 @@ if ($title && $description) {
$blog->access_id = ACCESS_PRIVATE;
$blog->title = $title;
$blog->description = $description;
- $blog->excerpt = elgg_make_excerpt($excerpt);
+ $blog->excerpt = elgg_get_excerpt($excerpt);
// must be present or doesn't show up when metadata sorting.
$blog->publish_date = time();
diff --git a/mod/blog/actions/blog/delete.php b/mod/blog/actions/blog/delete.php
index 8fa1ff889..ee8621257 100644
--- a/mod/blog/actions/blog/delete.php
+++ b/mod/blog/actions/blog/delete.php
@@ -13,8 +13,10 @@ $blog_guid = get_input('guid');
$blog = get_entity($blog_guid);
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/$container->username/read/");
} else {
register_error(elgg_echo('blog:error:cannot_delete_post'));
}
diff --git a/mod/blog/actions/blog/save.php b/mod/blog/actions/blog/save.php
index 2647e7b9a..9b1d04965 100644
--- a/mod/blog/actions/blog/save.php
+++ b/mod/blog/actions/blog/save.php
@@ -78,9 +78,9 @@ foreach ($values as $name => $default) {
case 'excerpt':
if ($value) {
- $value = elgg_make_excerpt($value);
+ $value = elgg_get_excerpt($value);
} else {
- $value = elgg_make_excerpt($values['description']);
+ $value = elgg_get_excerpt($values['description']);
}
$values[$name] = $value;
break;
diff --git a/mod/bookmarks/actions/delete.php b/mod/bookmarks/actions/delete.php
index 5a35d44f5..e99c6604d 100644
--- a/mod/bookmarks/actions/delete.php
+++ b/mod/bookmarks/actions/delete.php
@@ -1,7 +1,7 @@
<?php
/**
* Elgg bookmarks delete action
- *
+ *
* @package ElggBookmarks
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider <info@elgg.com>
@@ -12,12 +12,13 @@
$guid = get_input('bookmark_guid',0);
if ($entity = get_entity($guid)) {
if ($entity->canEdit()) {
+ $container = get_entity($entity->container_guid);
if ($entity->delete()) {
system_message(elgg_echo("bookmarks:delete:success"));
- forward($_SERVER['HTTP_REFERER']);
+ forward("pg/bookmarks/$container->username/");
}
}
}
-
+
register_error(elgg_echo("bookmarks:delete:failed"));
forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
diff --git a/mod/embed/views/default/embed/item/gallery.php b/mod/embed/views/default/embed/item/gallery.php
index 09cab3cef..52c0966fa 100644
--- a/mod/embed/views/default/embed/item/gallery.php
+++ b/mod/embed/views/default/embed/item/gallery.php
@@ -23,7 +23,7 @@ $icon_size = $vars['icon_size'];
// different entity types have different title attribute names.
$title = isset($item->name) ? $item->name : $item->title;
// don't let it be too long
-$title = elgg_make_excerpt($title);
+$title = elgg_get_excerpt($title);
// @todo you can disable plugins that are required by other plugins
// (embed requires ecml) so fallback to a hard-coded check to see if ecml is enabled.
diff --git a/mod/embed/views/default/embed/item/list.php b/mod/embed/views/default/embed/item/list.php
index c45b42e19..8cc60753c 100644
--- a/mod/embed/views/default/embed/item/list.php
+++ b/mod/embed/views/default/embed/item/list.php
@@ -21,7 +21,7 @@ $icon_size = $vars['icon_size'];
// different entity types have different title attribute names.
$title = isset($item->name) ? $item->name : $item->title;
// don't let it be too long
-$title = elgg_make_excerpt($title);
+$title = elgg_get_excerpt($title);
// @todo you can disable plugins that are required by other plugins
// (embed requires ecml) so fallback to a hard-coded check to see if ecml is enabled.
diff --git a/mod/file/actions/delete.php b/mod/file/actions/delete.php
index ee6dab91e..7e826278c 100644
--- a/mod/file/actions/delete.php
+++ b/mod/file/actions/delete.php
@@ -63,6 +63,6 @@
}
- forward("pg/file/" . $_SESSION['user']->username);
+ forward("pg/file/$container->username/");
?> \ No newline at end of file
diff --git a/mod/groups/views/default/river/forum/create.php b/mod/groups/views/default/river/forum/create.php
index 7fc3affe7..9895fac85 100644
--- a/mod/groups/views/default/river/forum/create.php
+++ b/mod/groups/views/default/river/forum/create.php
@@ -20,7 +20,7 @@
$string .= elgg_view('likes/forms/link', array('entity' => $object));
$string .= "</span>";
$string .= "<div class=\"river_content_display\">";
- $string .= elgg_make_excerpt($contents, 200);
+ $string .= elgg_get_excerpt($contents, 200);
$string .= "</div>";
echo $string;
diff --git a/mod/groups/views/default/river/forum/topic/create.php b/mod/groups/views/default/river/forum/topic/create.php
index 0d70ad718..09b2a3483 100644
--- a/mod/groups/views/default/river/forum/topic/create.php
+++ b/mod/groups/views/default/river/forum/topic/create.php
@@ -23,7 +23,7 @@
}
$string .= "</span>";
$string .= "<div class=\"river_content_display\">";
- $string .= elgg_make_excerpt($contents, 200);
+ $string .= elgg_get_excerpt($contents, 200);
$string .= "</div>";
echo $string; \ No newline at end of file
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;
diff --git a/mod/reportedcontent/views/default/admin/overview/reportedcontent.php b/mod/reportedcontent/views/default/admin/overview/reportedcontent.php
index 4207aacd2..9828b10ff 100644
--- a/mod/reportedcontent/views/default/admin/overview/reportedcontent.php
+++ b/mod/reportedcontent/views/default/admin/overview/reportedcontent.php
@@ -9,9 +9,6 @@
* @link http://elgg.com/
*/
-// Set admin user for user block
-set_page_owner($_SESSION['guid']);
-
$title = elgg_view_title(elgg_echo('reportedcontent'));
$reported = elgg_get_entities(array('types' => 'object', 'subtypes' => 'reported_content', 'limit' => 9999));
diff --git a/mod/riverdashboard/endpoint/get_comments.php b/mod/riverdashboard/endpoint/get_comments.php
index 017591fa5..cc210b126 100644
--- a/mod/riverdashboard/endpoint/get_comments.php
+++ b/mod/riverdashboard/endpoint/get_comments.php
@@ -31,7 +31,7 @@ foreach ($comments as $comment) {
echo "</span>";
//truncate comment to 150 characters and strip tags
- $contents = elgg_make_excerpt($comment->value, 150);
+ $contents = elgg_get_excerpt($comment->value, 150);
echo "<div class='river_comment_contents'>";
echo "<a href=\"{$comment_owner_url}\">" . $comment_owner->name . '</a>&nbsp;<span class="twitter_anywhere">' . parse_urls($contents) . '</span>';
diff --git a/mod/riverdashboard/views/default/river/item/wrapper.php b/mod/riverdashboard/views/default/river/item/wrapper.php
index 2b964510d..6dd4e91d3 100644
--- a/mod/riverdashboard/views/default/river/item/wrapper.php
+++ b/mod/riverdashboard/views/default/river/item/wrapper.php
@@ -101,7 +101,7 @@ if ($comments){
echo "</span>";
//truncate comment to 150 characters and strip tags
- $contents = elgg_make_excerpt($comment->value, 150);
+ $contents = elgg_get_excerpt($comment->value, 150);
echo "<div class='river_comment_contents'>";
echo "<a href=\"{$comment_owner_url}\">" . $comment_owner->name . '</a>&nbsp;<span class="elgg_excerpt">' . parse_urls($contents) . '</span>';