Tighten ACP forum actions and avatar handling

This commit is contained in:
Micha
2026-01-13 00:07:25 +01:00
parent 3bb2946656
commit 98094459e3
9 changed files with 116 additions and 38 deletions

View File

@@ -68,7 +68,12 @@ class ForumController extends Controller
}
}
$position = Forum::where('parent_id', $parentId)->max('position');
if ($parentId === null) {
Forum::whereNull('parent_id')->increment('position');
$position = 0;
} else {
$position = Forum::where('parent_id', $parentId)->max('position');
}
$forum = Forum::create([
'name' => $data['name'],