From cf562689ce7c67ad39b69030339a80fc7102ce50 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 26 Nov 2023 21:30:29 +0000 Subject: [PATCH] fix checkbox update --- Controller/ApiController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index a72971c..136cab6 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -116,9 +116,9 @@ final class ApiController extends Controller */ private function updateCommentListFromRequest(RequestAbstract $request, CommentList $new) : CommentList { - $new->allowEdit = $request->getDataBool('allow_edit') ?? $new->allowEdit; - $new->allowVoting = $request->getDataBool('allow_voting') ?? $new->allowVoting; - $new->allowFiles = $request->getDataBool('allow_upload') ?? $new->allowFiles; + $new->allowEdit = $request->getDataBool('allow_edit') ?? false; + $new->allowVoting = $request->getDataBool('allow_voting') ?? false; + $new->allowFiles = $request->getDataBool('allow_upload') ?? false; $new->status = $request->getDataInt('commentlist_status') ?? $new->status; return $new;