mirror of
https://github.com/flarum/core.git
synced 2025-07-15 05:46:24 +02:00
feat: deprecate discussion post_number_index
field.
This commit is contained in:
committed by
Daniël Klabbers
parent
e25c53c00f
commit
00b9151864
@ -30,7 +30,7 @@ use Illuminate\Support\Str;
|
||||
* @property string $slug
|
||||
* @property int $comment_count
|
||||
* @property int $participant_count
|
||||
* @property int $post_number_index
|
||||
* @property int $post_number_index !!DEPRECATED!!
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property int|null $user_id
|
||||
* @property int|null $first_post_id
|
||||
|
@ -74,7 +74,7 @@ class PostReplyHandler
|
||||
|
||||
// If this is the first post in the discussion, it's technically not a
|
||||
// "reply", so we won't check for that permission.
|
||||
if ($discussion->post_number_index > 0) {
|
||||
if ($discussion->first_post_id !== null) {
|
||||
$actor->assertCan('reply', $discussion);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user