mirror of
https://github.com/flarum/framework.git
synced 2025-03-02 07:41:12 +08:00
Change API attribute for hiding/restoring posts
This commit is contained in:
parent
85097660f0
commit
a820f3c4f4
@ -8,7 +8,7 @@ class EditPostCommand
|
|||||||
|
|
||||||
public $content;
|
public $content;
|
||||||
|
|
||||||
public $hidden;
|
public $isHidden;
|
||||||
|
|
||||||
public function __construct($postId, $user)
|
public function __construct($postId, $user)
|
||||||
{
|
{
|
||||||
|
@ -28,9 +28,9 @@ class EditPostCommandHandler implements CommandHandler
|
|||||||
$post->revise($command->content, $user);
|
$post->revise($command->content, $user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($command->hidden === true) {
|
if ($command->isHidden === true) {
|
||||||
$post->hide($user);
|
$post->hide($user);
|
||||||
} elseif ($command->hidden === false) {
|
} elseif ($command->isHidden === false) {
|
||||||
$post->restore($user);
|
$post->restore($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user