1
0
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:
Alexander Skvortsov
2022-03-30 15:51:21 -04:00
committed by Daniël Klabbers
parent e25c53c00f
commit 00b9151864
3 changed files with 3 additions and 3 deletions

View File

@ -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) {