mirror of
https://github.com/flarum/core.git
synced 2025-08-14 04:14:06 +02:00
Compare commits
1 Commits
tk/3787-fl
...
dk/DISCUSS
Author | SHA1 | Date | |
---|---|---|---|
|
dff35c1046 |
8
.github/workflows/prepare-release.yml
vendored
8
.github/workflows/prepare-release.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Prepare release
|
||||
uses: flarum/action-release@master
|
||||
with:
|
||||
next_tag: ${{ inputs.version }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
open_collective_token: ${{ secrets.OPEN_COLLECTIVE_TOKEN }}
|
||||
env:
|
||||
NEXT_TAG: ${{ inputs.version }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
OPEN_COLLECTIVE_TOKEN: ${{ secrets.OPEN_COLLECTIVE_TOKEN }}
|
||||
|
@@ -44,6 +44,7 @@ class LoadLikesRelationship
|
||||
$loadable = null;
|
||||
|
||||
if ($data instanceof Discussion) {
|
||||
// @phpstan-ignore-next-line
|
||||
$loadable = $data->newCollection($data->posts)->filter(function ($post) {
|
||||
return $post instanceof Post;
|
||||
});
|
||||
|
@@ -47,7 +47,8 @@ class LoadMentionedByRelationship
|
||||
$loadable = null;
|
||||
|
||||
if ($data instanceof Discussion) {
|
||||
$loadable = $data->newCollection($data->posts)->filter(function ($post) {
|
||||
// @phpstan-ignore-next-line
|
||||
$loadable = $data->newCollection((array) $data->posts)->filter(function ($post) {
|
||||
return $post instanceof Post;
|
||||
});
|
||||
} elseif ($data instanceof Collection) {
|
||||
|
@@ -19,10 +19,6 @@
|
||||
&.colored &-text, &--colored &-text {
|
||||
color: var(--tag-color) !important;
|
||||
}
|
||||
|
||||
&-icon {
|
||||
margin-right: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.TagLabel {
|
||||
|
@@ -26,7 +26,7 @@ class TagRepository
|
||||
return Tag::query();
|
||||
}
|
||||
|
||||
public function queryVisibleTo(?User $actor = null): Builder
|
||||
public function queryVisibleTo(User $actor): Builder
|
||||
{
|
||||
return $this->scopeVisibleTo($this->query(), $actor);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ class TagRepository
|
||||
* @param User|null $user
|
||||
* @return Builder<Tag>
|
||||
*/
|
||||
protected function scopeVisibleTo(Builder $query, ?User $user = null)
|
||||
protected function scopeVisibleTo(Builder $query, User $user = null)
|
||||
{
|
||||
if ($user !== null) {
|
||||
$query->whereVisibleTo($user);
|
||||
|
2
framework/core/js/dist/forum.js
generated
vendored
2
framework/core/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
framework/core/js/dist/forum.js.map
generated
vendored
2
framework/core/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -98,7 +98,7 @@ export default class DiscussionListItem<CustomAttrs extends IDiscussionListItemA
|
||||
|
||||
return (
|
||||
<span
|
||||
className={classList('Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic', { disabled: !isUnread })}
|
||||
className={classList('Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic', { disabled: isUnread })}
|
||||
onclick={this.markAsRead.bind(this)}
|
||||
>
|
||||
{icon('fas fa-check')}
|
||||
|
@@ -256,10 +256,7 @@ abstract class AbstractModel extends Eloquent
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Support\Collection|array $models
|
||||
*/
|
||||
public function newCollection($models = [])
|
||||
public function newCollection(array $models = [])
|
||||
{
|
||||
return new Collection($models);
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ class GroupRepository
|
||||
return $this->scopeVisibleTo($query, $actor)->firstOrFail();
|
||||
}
|
||||
|
||||
public function queryVisibleTo(?User $actor = null)
|
||||
public function queryVisibleTo(User $actor = null)
|
||||
{
|
||||
return $this->scopeVisibleTo($this->query(), $actor);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ class GroupRepository
|
||||
* @param User|null $actor
|
||||
* @return Builder<Group>
|
||||
*/
|
||||
protected function scopeVisibleTo(Builder $query, ?User $actor = null)
|
||||
protected function scopeVisibleTo(Builder $query, User $actor = null)
|
||||
{
|
||||
if ($actor !== null) {
|
||||
$query->whereVisibleTo($actor);
|
||||
|
@@ -29,7 +29,7 @@ class PostRepository
|
||||
* @param User|null $user
|
||||
* @return Builder<Post>
|
||||
*/
|
||||
public function queryVisibleTo(?User $user = null)
|
||||
public function queryVisibleTo(User $user = null)
|
||||
{
|
||||
$query = $this->query();
|
||||
|
||||
|
Reference in New Issue
Block a user