aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/lib
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-12-23 23:01:08 -0500
committerCash Costello <cash.costello@gmail.com>2011-12-23 23:01:08 -0500
commitb18e603a928801d5a3d9f2847e03a96307937e19 (patch)
tree26965bb6d414ff6eb2743a8168783798209d2394 /mod/blog/lib
parent995472e31c181c729944d2bd9f2c4af5453705e3 (diff)
downloadelgg-b18e603a928801d5a3d9f2847e03a96307937e19.tar.gz
elgg-b18e603a928801d5a3d9f2847e03a96307937e19.tar.bz2
Fixes #3751 adds a group blog archive page
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