mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 14:20:47 +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 $hidden;
|
||||
public $isHidden;
|
||||
|
||||
public function __construct($postId, $user)
|
||||
{
|
||||
|
|
|
@ -28,9 +28,9 @@ class EditPostCommandHandler implements CommandHandler
|
|||
$post->revise($command->content, $user);
|
||||
}
|
||||
|
||||
if ($command->hidden === true) {
|
||||
if ($command->isHidden === true) {
|
||||
$post->hide($user);
|
||||
} elseif ($command->hidden === false) {
|
||||
} elseif ($command->isHidden === false) {
|
||||
$post->restore($user);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user