aboutsummaryrefslogtreecommitdiff
path: root/mod/blog
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-23 00:02:33 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-23 00:02:33 +0000
commit250e367c61b55ee4399e2b4ee49b940512b24b53 (patch)
tree37c7d96f1d3ef1ab6ed9b9e0da533288b4abf0e5 /mod/blog
parent8f6acf45e0a371806424f51e19a08bc3edb44e75 (diff)
downloadelgg-250e367c61b55ee4399e2b4ee49b940512b24b53.tar.gz
elgg-250e367c61b55ee4399e2b4ee49b940512b24b53.tar.bz2
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
Diffstat (limited to 'mod/blog')
-rw-r--r--mod/blog/languages/en.php2
-rw-r--r--mod/blog/lib/blog.php17
2 files changed, 3 insertions, 16 deletions
diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php
index 126eff898..b626085d7 100644
--- a/mod/blog/languages/en.php
+++ b/mod/blog/languages/en.php
@@ -21,7 +21,7 @@ $english = array(
'blog:write' => 'Write a blog post',
// Editing
- 'blog:add' => 'New blog post',
+ 'blog:add' => 'Add blog post',
'blog:edit' => 'Edit blog post',
'blog:excerpt' => 'Excerpt',
'blog:body' => 'Body',
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';