mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 01:51:05 +08:00
Change API attribute for hiding/restoring posts
This commit is contained in:
parent
f56da376da
commit
227f19ddf6
|
@ -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