Commit 39485b1d authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon

"Tagged journal entries" block shouldn't grant access to whole journal

Bug 1521818. Making the "Tagged journal entries" block act more like
a collection of "Journal entry" blocks. So, it doesn't add the parent
blog to view_artefacts, only the specific blog entries that are
displayed in the block.

Also removing the title of the parent blog (and the link to it) from
the list of blog entries, like the "Journal entry" block, which
doesn't display the title of the containing journal.

Note the viewer may still have access to the whole blog, if the blog
is also shared on the same page via a "blog" or "recent journal entries"
block.

Change-Id: I33fc7e58b964c03bc8003f1de81a4bf58b6079b7
(cherry picked from commit ada12dba)
parent 3d469dff
......@@ -449,7 +449,6 @@ EOF;
$blogposts = self::get_blog_posts_in_block($instance);
foreach ($blogposts as $blogpost) {
$artefacts[] = $blogpost->id;
$artefacts[] = $blogpost->parent;
$blogpostobj = $instance->get_artefact_instance($blogpost->id);
$artefacts = array_merge($artefacts, $blogpostobj->get_referenced_artefacts_from_postbody());
......
......@@ -49,9 +49,6 @@
{else}<ul class="taggedposts">{foreach from=$results item=post}
<li>
<strong><a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">{$post->title}</a></strong>
{str tag='postedin' section='blocktype.blog/taggedposts'}
{if $viewowner}{$post->parenttitle}
{else}<a href="{$WWWROOT}artefact/artefact.php?artefact={$post->parent}&view={$view}">{$post->parenttitle}</a>{/if}
<span class="postdetails">{str tag='postedon' section='blocktype.blog/taggedposts'} {$post->displaydate}</span>
</li>
{/foreach}</ul>
......
......@@ -17,3 +17,4 @@ And I follow "New entry"
And I press "Save entry"
Then I should see "Journal entry saved"
And I press "Publish"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment