aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/lib
diff options
context:
space:
mode:
Diffstat (limited to 'mod/blog/lib')
-rw-r--r--mod/blog/lib/blog.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php
index 590547a8c..286fe1832 100644
--- a/mod/blog/lib/blog.php
+++ b/mod/blog/lib/blog.php
@@ -187,11 +187,16 @@ function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) {
$now = time();
- $user = get_user($owner_guid);
+ $owner = get_entity($owner_guid);
elgg_set_page_owner_guid($owner_guid);
- $crumbs_title = $user->name;
- elgg_push_breadcrumb($crumbs_title, "blog/owner/{$user->username}");
+ $crumbs_title = $owner->name;
+ if (elgg_instanceof($owner, 'user')) {
+ $url = "blog/owner/{$owner->username}";
+ } else {
+ $url = "blog/group/$owner->guid/all";
+ }
+ elgg_push_breadcrumb($crumbs_title, $url);
elgg_push_breadcrumb(elgg_echo('blog:archives'));
if ($lower) {
@@ -209,7 +214,7 @@ function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) {
);
if ($owner_guid) {
- $options['owner_guid'] = $owner_guid;
+ $options['container_guid'] = $owner_guid;
}
// admin / owners can see any posts