mirror of
https://github.com/flarum/core.git
synced 2025-10-22 04:06:37 +02:00
merges 5.5 and master into next-back
This commit is contained in:
@@ -152,6 +152,16 @@ class CommentPost extends Post
|
||||
$this->attributes['content'] = $value ? static::$formatter->parse($value, $this) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the parsed/raw content.
|
||||
*
|
||||
* @param string $value
|
||||
*/
|
||||
public function setParsedContentAttribute($value)
|
||||
{
|
||||
$this->attributes['content'] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the content rendered as HTML.
|
||||
*
|
||||
|
@@ -152,7 +152,7 @@ class PostRepository
|
||||
{
|
||||
$discussions = $this->getDiscussionsForPosts($ids, $actor);
|
||||
|
||||
return Post::whereIn('id', $ids)
|
||||
$posts = Post::whereIn('id', $ids)
|
||||
->where(function ($query) use ($discussions, $actor) {
|
||||
foreach ($discussions as $discussion) {
|
||||
$query->orWhere(function ($query) use ($discussion, $actor) {
|
||||
@@ -164,6 +164,12 @@ class PostRepository
|
||||
|
||||
$query->orWhereRaw('FALSE');
|
||||
});
|
||||
|
||||
foreach ($posts as $post) {
|
||||
$post->discussion = $discussions->find($post->discussion_id);
|
||||
}
|
||||
|
||||
return $posts;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user