From 250e367c61b55ee4399e2b4ee49b940512b24b53 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 23 Mar 2011 00:02:33 +0000 Subject: Fixes #3218 group content pages now use container method to determine who can add content git-svn-id: http://code.elgg.org/elgg/trunk@8818 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/lib/blog.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'mod/blog/lib') diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 83e6c84ee..e5a44a200 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -79,24 +79,11 @@ function blog_get_page_content_list($container_guid = NULL) { if ($container_guid == $loggedin_userid) { $return['filter_context'] = 'mine'; + } else if (elgg_instanceof($container, 'group')) { + $return['filter'] = false; } else { // do not show button or select a tab when viewing someone else's posts $return['filter_context'] = 'none'; - $return['buttons'] = ''; - } - - if (elgg_instanceof($container, 'group')) { - $return['filter'] = ''; - if ($container->canWriteToContainer()) { - $url = "blog/add/$container->guid"; - $params = array( - 'href' => $url, - 'text' => elgg_echo("blog:add"), - 'class' => 'elgg-button elgg-button-action', - ); - $buttons = elgg_view('output/url', $params); - $return['buttons'] = $buttons; - } } } else { $return['filter_context'] = 'all'; -- cgit v1.2.3