mirror of
https://github.com/flarum/core.git
synced 2025-07-16 06:16:23 +02:00
feat: deprecate discussion post_number_index
field.
This commit is contained in:
committed by
Daniël Klabbers
parent
e25c53c00f
commit
00b9151864
@ -24,7 +24,7 @@ class UnapproveNewContent
|
||||
$post = $event->post;
|
||||
|
||||
if (! $post->exists) {
|
||||
$ability = $post->discussion->post_number_index == 0 ? 'startWithoutApproval' : 'replyWithoutApproval';
|
||||
$ability = $post->discussion->first_post_id === null ? 'startWithoutApproval' : 'replyWithoutApproval';
|
||||
|
||||
if ($event->actor->can($ability, $post->discussion)) {
|
||||
if ($post->is_approved === null) {
|
||||
|
Reference in New Issue
Block a user